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:
parent
d6af0d8c9a
commit
3b8e424232
@ -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()", () => {
|
||||
|
Loading…
Reference in New Issue
Block a user