X-Git-Url: https://juplo.de/gitweb/?a=blobdiff_plain;f=consumer%2Fsrc%2F__tests__%2Fdelete-order.spec.js;h=6f0e5d124a1bb7086c66b0fc69812e5b924159a6;hb=8c6795dbb8bbc957bc27237063f6429d54a25ac7;hp=988f84a6b678f7eb31f40bb2428c65a3616655fe;hpb=ecaa238c0252d9057e4fbccfc4f16d3d2e37ef2b;p=demos%2Fexample-siren diff --git a/consumer/src/__tests__/delete-order.spec.js b/consumer/src/__tests__/delete-order.spec.js index 988f84a..6f0e5d1 100644 --- a/consumer/src/__tests__/delete-order.spec.js +++ b/consumer/src/__tests__/delete-order.spec.js @@ -22,7 +22,6 @@ describe("Siren Pact test", () => { provider = new PactV3({ consumer: "Siren Order Provider", provider: "Siren Order Service", - port: 9000, dir: path.resolve(process.cwd(), "pacts") }) }) @@ -33,7 +32,8 @@ describe("Siren Pact test", () => { // Get Root Request .uponReceiving("get root") .withRequest({ - path: "/", + method: "GET", + path: "/" }) .willRespondWith({ status: 200, @@ -41,14 +41,15 @@ describe("Siren Pact test", () => { 'Content-Type': 'application/vnd.siren+json' }, body: { - class:[ "representation"], - links:[{"rel":["orders"], "href": url("http://localhost:9000", ["orders"]) }] + class: [ "representation"], + links: [{"rel":["orders"], "href": url(["orders"]) }] } }) // Get Orders Request .uponReceiving("get all orders") .withRequest({ + method: "GET", path: "/orders", }) .willRespondWith({ @@ -67,26 +68,26 @@ describe("Siren Pact test", () => { links: [ { "rel": [ "self" ], - "href": url("http://localhost:9000", ["orders", regex("\\d+", "1234")]) + "href": url(["orders", regex("\\d+", "1234")]) } ], "actions": arrayContaining( { "name": "update", "method": "PUT", - "href": url("http://localhost:9000", ["orders", regex("\\d+", "1234")]) + "href": url(["orders", regex("\\d+", "1234")]) }, { "name": "delete", "method": "DELETE", - "href": url("http://localhost:9000", ["orders", regex("\\d+", "1234")]) + "href": url(["orders", regex("\\d+", "1234")]) } ) }), links: [ { rel: [ "self" ], - href: url("http://localhost:9000", ["orders"]) + href: url(["orders"]) } ] }