WIP
[demos/example-siren] / spring-consumer / src / test / java / de / juplo / demos / pact / ContractTest.java
index c97432b..85d40b0 100644 (file)
@@ -32,9 +32,17 @@ public class ContractTest
             .headers(Map.of("Content-Type", "application/vnd.siren+json"))
             .body(LambdaDsl.newJsonBody(body ->
             {
-              body.arrayContaining("actions", actions ->
+              body.array("entities", entities ->
               {
-                actions.stringType("foo");
+                body.arrayContaining("actions", actions ->
+                {
+                  actions.object(object ->
+                  {
+                    object.stringType("name","update");
+                    object.stringType("method", "PUT");
+                    object.matchUrl2("href", Matchers.regexp("\\d+", "1234"));
+                  });
+                });
               });
             }).build())
         .toPact();