-
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 2140 #1583
base: master
Are you sure you want to change the base?
Dtsrd 2140 #1583
Conversation
* DTSRD-2525: handle flyway out of order * DTSRD-2525: handle flyway out of order
log.info("deletePbaOfExistingOrganisationShouldBeForbiddenWhenLDOff :: STARTED"); | ||
|
||
setUpTestData(); | ||
String bearerToken = inviteUser(puiFinanceManager, intActiveOrgId, generateRandomEmail(), |
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.
dont need to invite another user to delete payment account ? for internal endpoint prd-admin only allowed to delete payment account.
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.
done
deletePbaRequest.setPaymentAccounts(Set.of("PBA0000021", "PBA0000022", "PBA0000023")); | ||
|
||
professionalApiClient.deletePaymentAccountsOfOrganisation(deletePbaRequest, | ||
professionalApiClient.getMultipleAuthHeaders(bearerToken), BAD_REQUEST); |
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.
incorrect status code bad request, api should return 403 when feature is toggled off
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.
done
String intActiveOrgId = createAndActivateOrganisationWithGivenRequest(organisationCreationRequest, | ||
hmctsAdmin); | ||
|
||
String bearerToken = inviteUser(puiFinanceManager, intActiveOrgId, generateRandomEmail(), |
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.
dont need to invite finance manager user to delete payment account, remove this line
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.
done
log.info("deletePbaOfExistingOrganisationShouldBeForbiddenWhenLDOff :: END"); | ||
} | ||
|
||
public String inviteUser(String role, |
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.
this method not required, remove it
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.
done , removed
PbaRequest deletePbaRequest = new PbaRequest(); | ||
deletePbaRequest.setPaymentAccounts(Set.of("PBA0000021", "PBA0000022", "PBA0000023")); | ||
|
||
professionalApiClient.deletePaymentAccountsOfOrganisation(deletePbaRequest, |
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.
this line making a call to existing external endpoint, so this test is invalid. make change to call new internal endpoint with prd-admin user
PbaRequest deletePbaRequest = new PbaRequest(); | ||
deletePbaRequest.setPaymentAccounts(organisationCreationRequest.getPaymentAccount()); | ||
|
||
professionalApiClient.deletePaymentAccountsOfOrganisation(deletePbaRequest, |
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.
this line making a call to existing external endpoint, so this test is invalid. make change to call new internal endpoint with prd-admin user
deletePbaRequest.setPaymentAccounts(organisationCreationRequest.getPaymentAccount()); | ||
|
||
professionalApiClient.deletePaymentAccountsOfOrganisation(deletePbaRequest, | ||
professionalApiClient.getMultipleAuthHeaders(bearerToken), NO_CONTENT); |
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.
wrong user token used, it should be prd-user token
|
||
@Operation( | ||
summary = "Deletes the provided list of payment accounts from the organisation.", | ||
description = "**IDAM Roles to access API** : <br> - pui-finance-manager", |
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.
wrong role , it should be prd-admin
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.
done
Jira link (if applicable)
Change description
Checklist