use of uk.gov.ida.hub.policy.domain.state.RequesterErrorState in project verify-hub by alphagov.
the class ErrorStateControllerTests method shouldReturnErrorResponseWhenAskedAndInRequesterErrorState.
@Test
public void shouldReturnErrorResponseWhenAskedAndInRequesterErrorState() {
RequesterErrorState state = RequesterErrorStateBuilder.aRequesterErrorState().build();
StateController stateController = new RequesterErrorStateController(state, responseFromHubFactory, stateTransitionAction, transactionsConfigProxy, identityProvidersConfigProxy, hubEventLogger);
when(sessionRepository.getStateController(sessionId, ErrorResponsePreparedState.class)).thenReturn(stateController);
ResponseFromHub responseFromHub = authnRequestFromTransactionHandler.getErrorResponseFromHub(sessionId);
assertThat(responseFromHub.getStatus()).isEqualTo(TransactionIdaStatus.NoAuthenticationContext);
}
Aggregations