Skip to content

Commit

Permalink
DTSRD-3358: Create New FTA Role for IBCA in RD (#931)
Browse files Browse the repository at this point in the history
* DTSRD-3358: Create New FTA Role for IBCA in RD

* DTSRD-3358: Create New FTA Role for IBCA in RD

* DTSRD-3358: Create New FTA Role for IBCA in RD
  • Loading branch information
kiran-yenigala-hmcts authored Sep 10, 2024
1 parent b17fcf8 commit b15f9b9
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,12 @@ void shouldCreateCaseworkerWithNewRoles() {
CaseWorkerRoleRequest cwRoleRequest3 = new CaseWorkerRoleRequest("Registrar", false);
CaseWorkerRoleRequest cwRoleRequest4 = new CaseWorkerRoleRequest("CICA Caseworker", false);
CaseWorkerRoleRequest cwRoleRequest5 = new CaseWorkerRoleRequest("Cafcass Cymru Caseworker", false);
CaseWorkerRoleRequest cwRoleRequest6 = new CaseWorkerRoleRequest("IBCA Caseworker",false);


List<CaseWorkerRoleRequest> caseWorkerRoleRequests = ImmutableList
.of(cwRoleRequest,cwRoleRequest1,cwRoleRequest2,cwRoleRequest3, cwRoleRequest4, cwRoleRequest5);
.of(cwRoleRequest,cwRoleRequest1,cwRoleRequest2,cwRoleRequest3,
cwRoleRequest4, cwRoleRequest5, cwRoleRequest6);
caseWorkersProfileCreationRequests.get(0).setRoles(caseWorkerRoleRequests);
caseWorkersProfileCreationRequests.get(0).setUserType("Other Government Department");

Expand All @@ -167,6 +169,7 @@ void shouldCreateCaseworkerWithNewRoles() {
assertEquals(16,(long)caseWorkerRoles.get(3).getRoleId());
assertEquals(17,(long)caseWorkerRoles.get(4).getRoleId());
assertEquals(18,(long)caseWorkerRoles.get(5).getRoleId());
assertEquals(19,(long)caseWorkerRoles.get(6).getRoleId());
var caseWorkerProfile = caseWorkerProfileRepository.findAll();
assertEquals(5,caseWorkerProfile.get(0).getUserTypeId());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,12 @@ void shouldCreateCaseworkerWithNewRoles() {
CaseWorkerRoleRequest cwRoleRequest3 = new CaseWorkerRoleRequest("Registrar", false);
CaseWorkerRoleRequest cwRoleRequest4 = new CaseWorkerRoleRequest("CICA Caseworker", false);
CaseWorkerRoleRequest cwRoleRequest5 = new CaseWorkerRoleRequest("Cafcass Cymru Caseworker", false);
CaseWorkerRoleRequest cwRoleRequest6 = new CaseWorkerRoleRequest("IBCA Caseworker", false);


List<CaseWorkerRoleRequest> caseWorkerRoleRequests = ImmutableList
.of(cwRoleRequest, cwRoleRequest1, cwRoleRequest2, cwRoleRequest3, cwRoleRequest4, cwRoleRequest5);
.of(cwRoleRequest, cwRoleRequest1, cwRoleRequest2, cwRoleRequest3,
cwRoleRequest4, cwRoleRequest5, cwRoleRequest6);
caseWorkersProfileCreationRequests.get(0).setRoles(caseWorkerRoleRequests);
caseWorkersProfileCreationRequests.get(0).setUserType("Other Government Department");

Expand All @@ -169,6 +171,7 @@ void shouldCreateCaseworkerWithNewRoles() {
assertEquals(16, (long) caseWorkerRoles.get(3).getRoleId());
assertEquals(17, (long) caseWorkerRoles.get(4).getRoleId());
assertEquals(18, (long) caseWorkerRoles.get(5).getRoleId());
assertEquals(19,(long)caseWorkerRoles.get(6).getRoleId());
var caseWorkerProfile = caseWorkerProfileRepository.findAll();
assertEquals(5, caseWorkerProfile.get(0).getUserTypeId());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ void should_retrieveAllTitles_return_status_code_200()
List<StaffRefDataJobTitle> jobTitles = staffRefJobTitleResponse.getJobTitles();

assertThat(jobTitles).isNotNull();
assertThat(jobTitles).hasSize(18);
assertThat(jobTitles).hasSize(19);

StaffRefDataJobTitle staffRefDataJobTitle = jobTitles.get(0);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

INSERT INTO
role_type (role_id, description, created_date)
VALUES
(19, 'IBCA Caseworker',timezone('utc', now()));
5 changes: 5 additions & 0 deletions src/main/resources/db/migration/V1_26__insert_roletype.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

INSERT INTO
role_type (role_id, description, created_date)
VALUES
(19, 'IBCA Caseworker',timezone('utc', now()));
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,12 @@ void createCaseWorkerProfileWithNewRole() {
CaseWorkerRoleRequest cwRoleRequest1 = new CaseWorkerRoleRequest("Regional Centre Team Leader", false);
CaseWorkerRoleRequest cwRoleRequest2 = new CaseWorkerRoleRequest("DWP Caseworker",false);
CaseWorkerRoleRequest cwRoleRequest3 = new CaseWorkerRoleRequest("Registrar",false);
CaseWorkerRoleRequest cwRoleRequest4 = new CaseWorkerRoleRequest("IBCA Caseworker",false);
caseWorkerRoleRequests.add(cwRoleRequest);
caseWorkerRoleRequests.add(cwRoleRequest1);
caseWorkerRoleRequests.add(cwRoleRequest2);
caseWorkerRoleRequests.add(cwRoleRequest3);
caseWorkerRoleRequests.add(cwRoleRequest4);
caseWorkersProfileCreationRequest.get(0).setRoles(caseWorkerRoleRequests);
caseWorkersProfileCreationRequest.get(0).setUserType("Other Government Department");
when(caseWorkerServiceMock.processCaseWorkerProfiles(caseWorkersProfileCreationRequest))
Expand Down

0 comments on commit b15f9b9

Please sign in to comment.