Skip to content

Commit e851152

Browse files
committed
tests fix for the new error code
1 parent eb762db commit e851152

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/EhrResendController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
public class EhrResendController {
3131

3232
private static final String OPERATION_OUTCOME_URL = "https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-OperationOutcome-1";
33-
public static final String FORBIDDEN = "FORBIDDEN";
34-
public static final String INVALID_IDENTIFIER_VALUE = "INVALID_IDENTIFIER_VALUE";
33+
private static final String FORBIDDEN = "FORBIDDEN";
34+
private static final String INVALID_IDENTIFIER_VALUE = "INVALID_IDENTIFIER_VALUE";
3535

3636
private EhrExtractStatusRepository ehrExtractStatusRepository;
3737
private TaskDispatcher taskDispatcher;

service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/EhrResendControllerTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class EhrResendControllerTest {
4646
private static final String FROM_ASID_CODE = "test-from-asid";
4747
private static final String INCUMBENT_NACK_CODE = "99";
4848
private static final String INCUMBENT_NACK_DISPLAY = "Unexpected condition.";
49-
private static final String INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR";
49+
private static final String FORBIDDEN = "FORBIDDEN";
5050
private static final String GPCONNECT_ERROR_OR_WARNING_CODE = "http://fhir.nhs.net/ValueSet/gpconnect-error-or-warning-code-1";
5151
private static final String INVALID_IDENTIFIER_VALUE = "INVALID_IDENTIFIER_VALUE";
5252
public static final String ISSUE_CODE_VALUE = "value";
@@ -144,7 +144,7 @@ void When_AnEhrExtractHasNotFailedAndAnotherResendRequestArrives_Expect_FailedOp
144144
JsonNode rootNode = objectMapper.readTree(response.getBody());
145145

146146
assertAll(
147-
() -> assertResponseHasExpectedOperationOutcome(rootNode, INTERNAL_SERVER_ERROR, DIAGNOSTICS_MSG, ISSUE_CODE_BUSINESS_RULE),
147+
() -> assertResponseHasExpectedOperationOutcome(rootNode, FORBIDDEN, DIAGNOSTICS_MSG, ISSUE_CODE_BUSINESS_RULE),
148148
() -> assertEquals(HttpStatus.FORBIDDEN, response.getStatusCode())
149149
);
150150
}
@@ -199,7 +199,7 @@ void When_AnEhrExtractHasNotFailed_Expect_RespondsWith403() throws JsonProcessin
199199
JsonNode rootNode = objectMapper.readTree(response.getBody());
200200

201201
assertAll(
202-
() -> assertResponseHasExpectedOperationOutcome(rootNode, INTERNAL_SERVER_ERROR, DIAGNOSTICS_MSG, ISSUE_CODE_BUSINESS_RULE),
202+
() -> assertResponseHasExpectedOperationOutcome(rootNode, FORBIDDEN, DIAGNOSTICS_MSG, ISSUE_CODE_BUSINESS_RULE),
203203
() -> assertEquals(HttpStatus.FORBIDDEN, response.getStatusCode())
204204
);
205205
}

0 commit comments

Comments
 (0)