You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2017/09/11 02:37:04 UTC
[20/23] james-project git commit: JAMES-2138 Adding integration test
for Groups webadmin feature.
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 <bt...@linagora.com>
Authored: Wed Sep 6 13:53:46 2017 +0700
Committer: benwa <bt...@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", "user1@domain.com");
+ dataProbe.addAddressMapping("group", "domain.com", "user2@domain.com");
+
+ List<String> members = given()
+ .port(webAdminGuiceProbe.getWebAdminPort())
+ .when()
+ .get("/address/groups/group@domain.com")
+ .then()
+ .statusCode(200)
+ .contentType(JSON_CONTENT_TYPE)
+ .extract()
+ .jsonPath()
+ .getList(".");
+ assertThat(members).containsOnly("user1@domain.com", "user2@domain.com");
+ }
+
+ @Test
public void getSwaggerShouldReturnJsonDataForSwagger() throws Exception {
given()
.port(webAdminGuiceProbe.getWebAdminPort())
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org