From 2134f116dafd6f632ba20ea0e7c7041b079d4e81 Mon Sep 17 00:00:00 2001 From: Benjamin Gamard Date: Sun, 28 Oct 2018 17:26:34 +0100 Subject: [PATCH] #252: fix route test --- .../com/sismics/docs/rest/TestRouteModelResource.java | 2 +- .../java/com/sismics/docs/rest/TestRouteResource.java | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs-web/src/test/java/com/sismics/docs/rest/TestRouteModelResource.java b/docs-web/src/test/java/com/sismics/docs/rest/TestRouteModelResource.java index c9937f42..c6fd94eb 100644 --- a/docs-web/src/test/java/com/sismics/docs/rest/TestRouteModelResource.java +++ b/docs-web/src/test/java/com/sismics/docs/rest/TestRouteModelResource.java @@ -77,7 +77,7 @@ public class TestRouteModelResource extends BaseJerseyTest { Assert.assertEquals(0, routeModels.size()); // Add an ACL READ for routeModel1 with admin - json = target().path("/acl").request() + target().path("/acl").request() .cookie(TokenBasedSecurityFilter.COOKIE_NAME, adminToken) .put(Entity.form(new Form() .param("source", routeModelId) diff --git a/docs-web/src/test/java/com/sismics/docs/rest/TestRouteResource.java b/docs-web/src/test/java/com/sismics/docs/rest/TestRouteResource.java index 5eac656b..082a4e69 100644 --- a/docs-web/src/test/java/com/sismics/docs/rest/TestRouteResource.java +++ b/docs-web/src/test/java/com/sismics/docs/rest/TestRouteResource.java @@ -38,6 +38,15 @@ public class TestRouteResource extends BaseJerseyTest { .param("from", "contact@sismicsdocs.com") ), JsonObject.class); + // Add an ACL READ for route1 with admin on the default workflow + target().path("/acl").request() + .cookie(TokenBasedSecurityFilter.COOKIE_NAME, adminToken) + .put(Entity.form(new Form() + .param("source", "default-document-review") + .param("perm", "READ") + .param("target", "route1") + .param("type", "USER")), JsonObject.class); + // Get all route models JsonObject json = target().path("/routemodel") .queryParam("sort_column", "2")