JAMES-2138 Adding integration test for Groups webadmin feature.
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/dc2ad6d9 Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/dc2ad6d9 Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/dc2ad6d9 Branch: refs/heads/master Commit: dc2ad6d9f3ab21129e2a0041595e9eb06a82f270 Parents: 4817caa Author: benwa <btell...@linagora.com> Authored: Wed Sep 6 13:53:46 2017 +0700 Committer: benwa <btell...@linagora.com> Committed: Sat Sep 9 10:46:41 2017 +0700 ---------------------------------------------------------------------- .../WebAdminServerIntegrationTest.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/james-project/blob/dc2ad6d9/server/protocols/webadmin-integration-test/src/test/java/org/apache/james/webadmin/integration/WebAdminServerIntegrationTest.java ---------------------------------------------------------------------- diff --git a/server/protocols/webadmin-integration-test/src/test/java/org/apache/james/webadmin/integration/WebAdminServerIntegrationTest.java b/server/protocols/webadmin-integration-test/src/test/java/org/apache/james/webadmin/integration/WebAdminServerIntegrationTest.java index 8b6230c..30c810d 100644 --- a/server/protocols/webadmin-integration-test/src/test/java/org/apache/james/webadmin/integration/WebAdminServerIntegrationTest.java +++ b/server/protocols/webadmin-integration-test/src/test/java/org/apache/james/webadmin/integration/WebAdminServerIntegrationTest.java @@ -28,6 +28,8 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.is; +import java.util.List; + import org.apache.james.CassandraJmapTestRule; import org.apache.james.DockerCassandraRule; import org.apache.james.GuiceJamesServer; @@ -261,6 +263,24 @@ public class WebAdminServerIntegrationTest { } @Test + public void addressGroupsEndpointShouldHandleRequests() throws Exception { + dataProbe.addAddressMapping("group", "domain.com", "us...@domain.com"); + dataProbe.addAddressMapping("group", "domain.com", "us...@domain.com"); + + List<String> members = given() + .port(webAdminGuiceProbe.getWebAdminPort()) + .when() + .get("/address/groups/gr...@domain.com") + .then() + .statusCode(200) + .contentType(JSON_CONTENT_TYPE) + .extract() + .jsonPath() + .getList("."); + assertThat(members).containsOnly("us...@domain.com", "us...@domain.com"); + } + + @Test public void getSwaggerShouldReturnJsonDataForSwagger() throws Exception { given() .port(webAdminGuiceProbe.getWebAdminPort()) --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org