Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Dec 20, 2023
1 parent 2150ee1 commit 9479710
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion client/src/components/InvitationRoleCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const InvitationRoleCard = ({
isNew = false
}) => {
const navigate = useNavigate();

const multiApp = applicationMaps.length > 1;
const application = applicationMaps[0];
const logo = multiApp ?<MultipleIcon/> : application.logo;
Expand Down
16 changes: 8 additions & 8 deletions server/src/test/java/access/api/RoleControllerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ void rolesByApplication() throws Exception {

@Test
void rolesByApplicationInstitutionAdmin() throws Exception {
super.stubForManagerProvidersByIdIn(EntityType.SAML20_SP, List.of("1"));
super.stubForManagerProvidersByIdIn(EntityType.OIDC10_RP, List.of("1"));
super.stubForManagerProvidersByIdIn(EntityType.SAML20_SP, List.of("1", "2"));
super.stubForManagerProvidersByIdIn(EntityType.OIDC10_RP, List.of("5"));

super.stubForManageProviderByOrganisationGUID(ORGANISATION_GUID);

Expand All @@ -171,8 +171,8 @@ void rolesByApplicationInstitutionAdmin() throws Exception {
@Test
void rolesByApplicationSuperUser() throws Exception {
AccessCookieFilter accessCookieFilter = openIDConnectFlow("/api/v1/users/login", SUPER_SUB);
super.stubForManagerProvidersByIdIn(EntityType.SAML20_SP, List.of("1"));
super.stubForManagerProvidersByIdIn(EntityType.OIDC10_RP, List.of("1"));
super.stubForManagerProvidersByIdIn(EntityType.SAML20_SP, List.of("1", "2", "3", "4"));
super.stubForManagerProvidersByIdIn(EntityType.OIDC10_RP, List.of("5", "6"));

List<Role> roles = given()
.when()
Expand Down Expand Up @@ -232,8 +232,8 @@ void deleteRole() throws Exception {
@Test
void search() throws Exception {
AccessCookieFilter accessCookieFilter = openIDConnectFlow("/api/v1/users/login", SUPER_SUB);
super.stubForManagerProvidersByIdIn(EntityType.SAML20_SP, List.of("1"));
super.stubForManagerProvidersByIdIn(EntityType.OIDC10_RP, List.of("1"));
super.stubForManagerProvidersByIdIn(EntityType.SAML20_SP, List.of("1", "2", "3", "4"));
super.stubForManagerProvidersByIdIn(EntityType.OIDC10_RP, List.of("5", "6"));

List<Role> roles = given()
.when()
Expand Down Expand Up @@ -284,8 +284,8 @@ void roleNotFound() throws Exception {

@Test
void rolesByApplicationInstitutionAdminByAPI() throws Exception {
super.stubForManagerProvidersByIdIn(EntityType.SAML20_SP, List.of("1"));
super.stubForManagerProvidersByIdIn(EntityType.OIDC10_RP, List.of("1"));
super.stubForManagerProvidersByIdIn(EntityType.SAML20_SP, List.of("1", "2"));
super.stubForManagerProvidersByIdIn(EntityType.OIDC10_RP, List.of("5"));
super.stubForManageProviderByOrganisationGUID(ORGANISATION_GUID);

List<Role> roles = given()
Expand Down

0 comments on commit 9479710

Please sign in to comment.