use of uk.gov.ida.hub.policy.domain.state.UserAccountCreationFailedState in project verify-hub by alphagov.
the class ErrorStateControllerTests method shouldReturnErrorResponseWhenAskedAndUserAccountCreationFailedState.
@Test
public void shouldReturnErrorResponseWhenAskedAndUserAccountCreationFailedState() {
UserAccountCreationFailedState state = UserAccountCreationFailedStateBuilder.aUserAccountCreationFailedState().build();
StateController stateController = new UserAccountCreationFailedStateController(state, responseFromHubFactory);
when(sessionRepository.getStateController(sessionId, ErrorResponsePreparedState.class)).thenReturn(stateController);
ResponseFromHub responseFromHub = authnRequestFromTransactionHandler.getErrorResponseFromHub(sessionId);
assertThat(responseFromHub.getStatus()).isEqualTo(TransactionIdaStatus.NoAuthenticationContext);
}
Aggregations