Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Nov 14, 2023
1 parent 47712d8 commit 8862d1b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions server/src/test/java/access/api/UserRoleControllerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import java.time.temporal.ChronoUnit;
import java.util.List;

import static access.Seed.INVITER_SUB;
import static access.Seed.MANAGE_SUB;
import static io.restassured.RestAssured.given;
import static org.junit.jupiter.api.Assertions.*;
Expand Down Expand Up @@ -107,9 +108,9 @@ void deleteUserRole() throws Exception {

@Test
void deleteUserRoleNotAllowed() throws Exception {
AccessCookieFilter accessCookieFilter = openIDConnectFlow("/api/v1/users/login", MANAGE_SUB);
List<UserRole> userRoles = userRoleRepository.findByRoleName("Wiki");
UserRole guestUserRole = userRoles.stream().filter(userRole -> userRole.getAuthority().equals(Authority.MANAGER)).findFirst().get();
AccessCookieFilter accessCookieFilter = openIDConnectFlow("/api/v1/users/login", INVITER_SUB);
List<UserRole> userRoles = userRoleRepository.findByRoleName("Calendar");
UserRole guestUserRole = userRoles.stream().filter(userRole -> userRole.getAuthority().equals(Authority.INVITER)).findFirst().get();
given()
.when()
.filter(accessCookieFilter.cookieFilter())
Expand Down

0 comments on commit 8862d1b

Please sign in to comment.