Skip to content

Commit

Permalink
fix: spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
tkuzynow committed Oct 30, 2023
1 parent 933bd10 commit ca6808c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,15 @@ UserRole.NOTIFICATIONS_TECHNICAL, singletonList(AuthorityValue.NOTIFICATIONS_TEC
GROUP_CHAT_CONSULTANT(
UserRole.GROUP_CHAT_CONSULTANT,
List.of(CONSULTANT_DEFAULT, CREATE_NEW_CHAT, START_CHAT, STOP_CHAT, UPDATE_CHAT)),
USER_ADMIN(UserRole.USER_ADMIN, List.of(AuthorityValue.USER_ADMIN, AuthorityValue.CONSULTANT_CREATE_UPDATE)),
USER_ADMIN(
UserRole.USER_ADMIN,
List.of(AuthorityValue.USER_ADMIN, AuthorityValue.CONSULTANT_CREATE_UPDATE)),
SINGLE_TENANT_ADMIN(
UserRole.SINGLE_TENANT_ADMIN, singletonList(AuthorityValue.SINGLE_TENANT_ADMIN)),
TENANT_ADMIN(UserRole.TENANT_ADMIN, singletonList(AuthorityValue.TENANT_ADMIN)),

RESTRICTED_CONSULTANT_ADMIN(UserRole.RESTRICTED_CONSULTANT_ADMIN, singletonList(CONSULTANT_CREATE_UPDATE)),
RESTRICTED_CONSULTANT_ADMIN(
UserRole.RESTRICTED_CONSULTANT_ADMIN, singletonList(CONSULTANT_CREATE_UPDATE)),
RESTRICTED_AGENCY_ADMIN(
UserRole.RESTRICTED_AGENCY_ADMIN, singletonList(AuthorityValue.RESTRICTED_AGENCY_ADMIN));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import static de.caritas.cob.userservice.api.adapters.web.controller.UserAdminControllerIT.AGENCY_CONSULTANT_PATH;
import static de.caritas.cob.userservice.api.adapters.web.controller.UserAdminControllerIT.CONSULTANT_AGENCIES_PATH;
import static de.caritas.cob.userservice.api.adapters.web.controller.UserAdminControllerIT.CONSULTANT_AGENCY_PATH;
import static de.caritas.cob.userservice.api.adapters.web.controller.UserAdminControllerIT.CONSULTANT_PATH;
import static de.caritas.cob.userservice.api.adapters.web.controller.UserAdminControllerIT.DELETE_ASKER_PATH;
import static de.caritas.cob.userservice.api.adapters.web.controller.UserAdminControllerIT.DELETE_CONSULTANT_AGENCY_PATH;
import static de.caritas.cob.userservice.api.adapters.web.controller.UserAdminControllerIT.DELETE_CONSULTANT_PATH;
import static de.caritas.cob.userservice.api.adapters.web.controller.UserAdminControllerIT.FILTERED_CONSULTANTS_PATH;
import static de.caritas.cob.userservice.api.adapters.web.controller.UserAdminControllerIT.CONSULTANT_PATH;
import static de.caritas.cob.userservice.api.adapters.web.controller.UserAdminControllerIT.PAGE_PARAM;
import static de.caritas.cob.userservice.api.adapters.web.controller.UserAdminControllerIT.PER_PAGE_PARAM;
import static de.caritas.cob.userservice.api.adapters.web.controller.UserAdminControllerIT.REPORT_PATH;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,13 @@ public void setUp() {

@Test
@WithMockUser(authorities = {AuthorityValue.USER_ADMIN})
void createNewConsultant_Should_returnOk_When_requiredConsultantIsGiven()
throws Exception {
void createNewConsultant_Should_returnOk_When_requiredConsultantIsGiven() throws Exception {
givenNewConsultantIsCreated();
}

@Test
@WithMockUser(authorities = {AuthorityValue.CREATE_NEW_CHAT})
void createNewConsultant_WithoutValidCredentials_Should_returnAccessDenied()
throws Exception {
void createNewConsultant_WithoutValidCredentials_Should_returnAccessDenied() throws Exception {
// given
CreateConsultantDTO createAdminDTO = new EasyRandom().nextObject(CreateConsultantDTO.class);
createAdminDTO.setEmail("[email protected]");
Expand All @@ -182,12 +180,10 @@ void createNewConsultant_WithoutValidCredentials_Should_returnAccessDenied()

@Test
@WithMockUser(authorities = {AuthorityValue.CONSULTANT_CREATE_UPDATE})
void createNewConsultant_WithAuthorityConsultantCreateUpdate_Should_returnOK()
throws Exception {
void createNewConsultant_WithAuthorityConsultantCreateUpdate_Should_returnOK() throws Exception {
givenNewConsultantIsCreated();
}


private String givenNewConsultantIsCreated() throws Exception {
// given
CreateConsultantDTO createAdminDTO = new EasyRandom().nextObject(CreateConsultantDTO.class);
Expand Down

0 comments on commit ca6808c

Please sign in to comment.