chibenwa commented on code in PR #2405:
URL: https://github.com/apache/james-project/pull/2405#discussion_r1754968725
##########
server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/SubAddressingTest.java:
##########
@@ -59,37 +64,48 @@ public class SubAddressingTest {
@BeforeEach
void setUp() throws MailboxException {
- usersRepository = mock(UsersRepository.class);
+ usersRepository =
MemoryUsersRepository.withVirtualHosting(NO_DOMAIN_LIST);
mailboxManager =
InMemoryIntegrationResources.defaultResources().getMailboxManager();
- MailboxSession session =
mailboxManager.createSystemSession(Username.of("recipient"));
+ MetricFactory metricFactory = new RecordingMetricFactory();
+
+ testee = new SubAddressing(usersRepository, mailboxManager,
metricFactory);
+ }
-
mailboxManager.createMailbox(MailboxPath.forUser(Username.of("recipient"),
"any"), session);
- testee = new SubAddressing(usersRepository, mailboxManager, session);
+ @Test
+ void shouldNotAddStorageDirectiveWhenNoRight() throws Exception {
Review Comment:
We need integration tests for this too
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]