-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DTSRD-2137. Update SRA Id #1668
base: master
Are you sure you want to change the base?
Conversation
|
||
|
||
@Operation( | ||
summary = "Updates an Organisation's name", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update swagger documentation for SRA Id, looks like copied from update organisation name endpoint
OrganisationSraUpdateRequest organisationSraUpdateRequest, String organisationIdentifier) { | ||
|
||
var existingOrganisation = organisationRepository.findByOrganisationIdentifier(organisationIdentifier); | ||
Organisation savedOrganisation = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove unused variable
final String attributeValue = "{\"regulatorType\":\"Solicitor Regulation Authority (SRA)\"," | ||
+ "\"organisationRegistrationNumber\":\"" + organisationNameSraUpdateRequest.getSraId() + "\"}"; | ||
|
||
existingOrganisation.setSraId( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicate existingOrganisation.setSraId , it is already added in updateOrganisationSra method
|
||
LocalDateTime updatedDate = LocalDateTime.parse(orgResponse.get("lastUpdated").toString()); | ||
assertThat(updatedDate.toLocalDate()).isEqualTo(LocalDate.now()); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add delete organisation call
|
||
assertNotNull(orgUpdatedSraIdResponse); | ||
assertThat(orgUpdatedSraIdResponse.statusCode()).isEqualTo(400); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add assertion for error message
@Secured({"prd-admin"}) | ||
public ResponseEntity<Object> updateOrganisationSra( | ||
@io.swagger.v3.oas.annotations.parameters.RequestBody(description = "organisationsraUpdateRequest") | ||
@Valid @NotNull @RequestBody OrganisationSraUpdateRequest organisationSraUpdateRequest, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change endpoint to accept list of organisation ids and sra ids similar to update org name endpoint and if any org id is failed to update then return error message for those failed org id's
} | ||
|
||
@Test | ||
void updateOrganisationSraIdShouldReturnSuccess() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
modify test case to update multiple sra ids
|
||
log.info("updateOrganisationSraIdShouldReturnSuccess :: END"); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add test case for partial success sra ids update
updateOrganisation(organisationIdentifier, hmctsAdmin, "ACTIVE"); | ||
|
||
return organisationIdentifier; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add test case for partial success sra ids update
|
||
|
||
@Test | ||
void update_sra_of_an_active_organisation_with_prd_admin_role_should_return_200() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
modify test case to update multiple sra ids
Jira link
See PROJ-XXXXXX
Change description
Testing done
Checklist