mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
Merge pull request #94 from oceanprotocol/feature/executeagreementtest
added test for failed service agreements
This commit is contained in:
commit
391e44aaab
@ -96,6 +96,21 @@ describe("ServiceAgreement", () => {
|
|||||||
assert(serviceDefinitionId)
|
assert(serviceDefinitionId)
|
||||||
assert(serviceDefinitionId !== did.getId())
|
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()", () => {
|
describe("#getStatus()", () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user