1
0
mirror of https://github.com/oceanprotocol-archive/squid-js.git synced 2024-02-02 15:31:51 +01:00

added test for failed service agreements

This commit is contained in:
Sebastian Gerske 2018-12-19 12:34:07 +01:00
parent d6af0d8c9a
commit 3b8e424232

View File

@ -96,6 +96,21 @@ describe("ServiceAgreement", () => {
assert(serviceDefinitionId)
assert(serviceDefinitionId !== did.getId())
})
it("should throw on invalid sig", (done) => {
const ddo = new DDO({id: did.getDid(), service: [accessService]})
const serviceAgreementId: string = IdGenerator.generateId()
// @ts-ignore
WebServiceConnectorProvider.setConnector(new WebServiceConnectorMock(ddo))
ServiceAgreement.executeServiceAgreement(did, ddo, accessService.serviceDefinitionId,
serviceAgreementId, "0x00", consumerAccount, publisherAccount)
.catch((err) => {
done()
})
})
})
describe("#getStatus()", () => {