florentos17 commented on code in PR #2419:
URL: https://github.com/apache/james-project/pull/2419#discussion_r1771218310


##########
server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SubAddressingTest.java:
##########
@@ -97,43 +97,106 @@ void tearDown() throws IOException {
     void 
subAddressedEmailShouldBeDeliveredInINBOXWhenSpecifiedFolderDoesNotExist(@TempDir
 File temporaryFolder) throws Exception {
         setup(temporaryFolder);
 
-        //do not create mailbox
+        // do not create mailbox
+        assertThat(testIMAPClient.sendCommand("GETACL " + 
TARGETED_MAILBOX)).contains("Mailbox not found");
 
         sendSubAddressedMail();
         awaitSubAddressedMail(MailboxConstants.INBOX);
     }
 
     @Test
-    void subAddressedEmailShouldBeDeliveredInINBOXWhenNoRights(@TempDir File 
temporaryFolder) throws Exception {
+    void subAddressedEmailShouldBeDeliveredInINBOXWhenNobodyHasRight(@TempDir 
File temporaryFolder) throws Exception {
         setup(temporaryFolder);
 
         // create mailbox
-        testIMAPClient.connect(LOCALHOST_IP, 
jamesServer.getProbe(ImapGuiceProbe.class).getImapPort())
-            .login(RECIPIENT, PASSWORD)
-            .create(TARGETED_MAILBOX);
+        testIMAPClient.sendCommand("CREATE " + TARGETED_MAILBOX);
+        assertThat(testIMAPClient.sendCommand("GETACL " + 
TARGETED_MAILBOX)).contains("OK GETACL");

Review Comment:
   yes you're right about the extra assertions, they are just for me "to be 
sure" but they are technically useless.
   
   about the dedicated location, I can't find Rights.script or mpt-core ; would 
mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryPositionRightTest.java
 be ok ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org

Reply via email to