james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [20/24] james-project git commit: JAMES-2366 Adds more information on invalid Forward route path
Date Fri, 06 Apr 2018 13:20:39 GMT
JAMES-2366 Adds more information on invalid Forward route path


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/aca51fcc
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/aca51fcc
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/aca51fcc

Branch: refs/heads/master
Commit: aca51fcc4f2d42394160962a4dfb15860b6acf41
Parents: 60299df
Author: benwa <btellier@linagora.com>
Authored: Thu Apr 5 09:54:20 2018 +0700
Committer: Antoine Duprat <aduprat@linagora.com>
Committed: Fri Apr 6 15:04:49 2018 +0200

----------------------------------------------------------------------
 .../java/org/apache/james/webadmin/routes/ForwardRoutes.java | 2 +-
 .../org/apache/james/webadmin/routes/ForwardRoutesTest.java  | 8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/aca51fcc/server/protocols/webadmin/webadmin-data/src/main/java/org/apache/james/webadmin/routes/ForwardRoutes.java
----------------------------------------------------------------------
diff --git a/server/protocols/webadmin/webadmin-data/src/main/java/org/apache/james/webadmin/routes/ForwardRoutes.java
b/server/protocols/webadmin/webadmin-data/src/main/java/org/apache/james/webadmin/routes/ForwardRoutes.java
index ffca23c..2145d40 100644
--- a/server/protocols/webadmin/webadmin-data/src/main/java/org/apache/james/webadmin/routes/ForwardRoutes.java
+++ b/server/protocols/webadmin/webadmin-data/src/main/java/org/apache/james/webadmin/routes/ForwardRoutes.java
@@ -116,7 +116,7 @@ public class ForwardRoutes implements Routes {
         throw ErrorResponder.builder()
             .statusCode(HttpStatus.BAD_REQUEST_400)
             .type(ErrorType.INVALID_ARGUMENT)
-            .message("An destination address needs to be specified in the path")
+            .message("A destination address needs to be specified in the path")
             .haltError();
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/aca51fcc/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/ForwardRoutesTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/ForwardRoutesTest.java
b/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/ForwardRoutesTest.java
index 11a1c10..08306a5 100644
--- a/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/ForwardRoutesTest.java
+++ b/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/ForwardRoutesTest.java
@@ -466,7 +466,9 @@ class ForwardRoutesTest {
                 .put(ALICE)
             .then()
                 .statusCode(HttpStatus.BAD_REQUEST_400)
-                .body(is(""));
+                .body("statusCode", is(400))
+                .body("type", is("InvalidArgument"))
+                .body("message", is("A destination address needs to be specified in the path"));
         }
 
         @Test
@@ -513,7 +515,9 @@ class ForwardRoutesTest {
                 .delete(ALICE)
             .then()
                 .statusCode(HttpStatus.BAD_REQUEST_400)
-                .body(is(""));
+                .body("statusCode", is(400))
+                .body("type", is("InvalidArgument"))
+                .body("message", is("A destination address needs to be specified in the path"));
         }
 
         @Test


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message