Skip to content

Commit

Permalink
extend test
Browse files Browse the repository at this point in the history
  • Loading branch information
BartChris committed Dec 11, 2024
1 parent b843df8 commit 9bd8055
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import static org.awaitility.Awaitility.await;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
Expand Down Expand Up @@ -193,6 +194,11 @@ private void assertDuplicateTitleNotAllowed(int projectId, boolean switchUserCon
if (switchUserContext) {
User userTwo = ServiceManager.getUserService().getById(2);
SecurityTestUtils.addUserDataToSecurityContext(userTwo, 1);
// Assert that the user 2 is NOT associated with project 2
assertFalse(ServiceManager.getProjectService()
.getById(projectId)
.getUsers()
.contains(userTwo), "User should not have access to projectOne");
}

// Second process creation with duplicate title
Expand Down

0 comments on commit 9bd8055

Please sign in to comment.