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 2018/07/25 10:08:05 UTC
[03/15] james-project git commit: JAMES-2499 Remove
SetMessagesMethodTest::mailboxIdsShouldBeInDestinationWhenUsingForMoveWithoutTrashFolder
JAMES-2499 Remove SetMessagesMethodTest::mailboxIdsShouldBeInDestinationWhenUsingForMoveWithoutTrashFolder
It makes no sens to test the behaviour without trash mailbox given that it is always provisioned.
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/eb126da3
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/eb126da3
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/eb126da3
Branch: refs/heads/master
Commit: eb126da38f1e956a31be243cf80c71dfc153d899
Parents: e38b96a
Author: benwa <bt...@linagora.com>
Authored: Wed Jul 25 10:11:36 2018 +0700
Committer: benwa <bt...@linagora.com>
Committed: Wed Jul 25 16:39:32 2018 +0700
----------------------------------------------------------------------
.../integration/SetMessagesMethodTest.java | 44 +-------------------
1 file changed, 1 insertion(+), 43 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/eb126da3/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java
index 67aa33c..980c2c8 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java
@@ -123,6 +123,7 @@ import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import com.google.common.io.ByteStreams;
import com.jayway.awaitility.Duration;
+
import io.restassured.RestAssured;
import io.restassured.builder.RequestSpecBuilder;
import io.restassured.http.ContentType;
@@ -3201,49 +3202,6 @@ public abstract class SetMessagesMethodTest {
.body(firstMessage + ".mailboxIds", contains(heartFolderId));
}
-
- @Test
- public void mailboxIdsShouldBeInDestinationWhenUsingForMoveWithoutTrashFolder() throws Exception {
- String newMailboxName = "heartFolder";
- String heartFolderId = mailboxProbe.createMailbox(MailboxConstants.USER_NAMESPACE, USERNAME, newMailboxName).serialize();
-
- ZonedDateTime dateTime = ZonedDateTime.parse("2014-10-30T14:12:00Z");
- ComposedMessageId message = mailboxProbe.appendMessage(USERNAME, MailboxPath.forUser(USERNAME, MailboxConstants.INBOX),
- new ByteArrayInputStream("Subject: my test subject\r\n\r\ntestmail".getBytes(StandardCharsets.UTF_8)), Date.from(dateTime.toInstant()), false, new Flags());
-
- String messageToMoveId = message.getMessageId().serialize();
- String requestBody = "[" +
- " [" +
- " \"setMessages\"," +
- " {" +
- " \"update\": { \"" + messageToMoveId + "\" : {" +
- " \"mailboxIds\": [\"" + heartFolderId + "\"]" +
- " }}" +
- " }," +
- " \"#0\"" +
- " ]" +
- "]";
-
- given()
- .header("Authorization", accessToken.serialize())
- .body(requestBody)
- .when()
- .post("/jmap");
-
- String firstMessage = ARGUMENTS + ".list[0]";
- given()
- .header("Authorization", accessToken.serialize())
- .body("[[\"getMessages\", {\"ids\": [\"" + messageToMoveId + "\"]}, \"#0\"]]")
- .when()
- .post("/jmap")
- .then()
- .statusCode(200)
- .log().ifValidationFails()
- .body(NAME, equalTo("messages"))
- .body(ARGUMENTS + ".list", hasSize(1))
- .body(firstMessage + ".mailboxIds", contains(heartFolderId));
- }
-
@Test
public void mailboxIdsShouldNotBeAnymoreInSourceWhenUsingForMove() throws Exception {
String newMailboxName = "heartFolder";
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org