#252: fix route test

This commit is contained in:
Benjamin Gamard 2018-10-28 17:26:34 +01:00
parent feb3d15968
commit 2134f116da
2 changed files with 10 additions and 1 deletions

View File

@ -77,7 +77,7 @@ public class TestRouteModelResource extends BaseJerseyTest {
Assert.assertEquals(0, routeModels.size()); Assert.assertEquals(0, routeModels.size());
// Add an ACL READ for routeModel1 with admin // Add an ACL READ for routeModel1 with admin
json = target().path("/acl").request() target().path("/acl").request()
.cookie(TokenBasedSecurityFilter.COOKIE_NAME, adminToken) .cookie(TokenBasedSecurityFilter.COOKIE_NAME, adminToken)
.put(Entity.form(new Form() .put(Entity.form(new Form()
.param("source", routeModelId) .param("source", routeModelId)

View File

@ -38,6 +38,15 @@ public class TestRouteResource extends BaseJerseyTest {
.param("from", "contact@sismicsdocs.com") .param("from", "contact@sismicsdocs.com")
), JsonObject.class); ), 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 // Get all route models
JsonObject json = target().path("/routemodel") JsonObject json = target().path("/routemodel")
.queryParam("sort_column", "2") .queryParam("sort_column", "2")