FINERACT-1503:FixStaffModule
This commit is contained in:
committed by
Aleksandar Vidakovic
parent
45bed0a05a
commit
72fd2fe134
@@ -241,4 +241,22 @@ public class StaffTest {
|
||||
map.put("xyz", "xyz");
|
||||
StaffHelper.updateStaff(requestSpec, responseSpecForValidationError, 1, map);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testStaffLoanOfficer() {
|
||||
final Map<String, Object> map = StaffHelper.getMapWithJoiningDate();
|
||||
|
||||
map.put("officeId", 1);
|
||||
map.put("firstname", Utils.randomNameGenerator("michael_", 5));
|
||||
map.put("lastname", Utils.randomNameGenerator("Doe_", 5));
|
||||
map.put("isLoanOfficer", true);
|
||||
|
||||
StaffHelper.createStaffWithJson(requestSpec, responseSpec, new Gson().toJson(map));
|
||||
|
||||
List<Map<String, Object>> responseActive = StaffHelper.getStaffListWithLoanOfficerStatus(requestSpec, responseSpec, "true");
|
||||
for (final Map<String, Object> staff : responseActive) {
|
||||
Assertions.assertNotNull(staff.get("id"));
|
||||
Assertions.assertEquals(true, staff.get("isLoanOfficer"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
@@ -87,6 +87,12 @@ public final class StaffHelper {
|
||||
return Utils.performServerGet(requestSpec, responseSpec, url, "");
|
||||
}
|
||||
|
||||
public static List<Map<String, Object>> getStaffListWithLoanOfficerStatus(final RequestSpecification requestSpec,
|
||||
final ResponseSpecification responseSpec, final String loanOfficerStatus) {
|
||||
final String url = CREATE_STAFF_URL + "?" + Utils.TENANT_IDENTIFIER + "&loanOfficersOnly=" + loanOfficerStatus;
|
||||
return Utils.performServerGet(requestSpec, responseSpec, url, "");
|
||||
}
|
||||
|
||||
public static Map<String, Object> updateStaff(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
|
||||
final Integer staffId, final Map<String, Object> changes) {
|
||||
final String url = CREATE_STAFF_URL + "/" + staffId + "?" + Utils.TENANT_IDENTIFIER;
|
||||
|
||||
Reference in New Issue
Block a user