Skip to content

Commit

Permalink
TARA2-282 update of tests to handle new status mechanism.
Browse files Browse the repository at this point in the history
  • Loading branch information
naare authored and alarkvell committed Jul 28, 2021
1 parent 1f7d5be commit a3e68a5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/test/groovy/ee/ria/tara/SmartIDAuthSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,12 @@ class SmartIDAuthSpec extends TaraSpecification {
def "initialize Smart-ID authentication with no smart-id contract: #label"() {
expect:
Steps.startAuthenticationInTara(flow, "openid smartid",login_locale)
Response initSidAuthenticationSession = Steps.initSidAuthSession(flow, flow.sessionId, "60001019906", Collections.emptyMap())
assertEquals("Correct HTTP status code is returned", 400, initSidAuthenticationSession.statusCode())
assertEquals("Correct Content-Type is returned", "application/json;charset=UTF-8", initSidAuthenticationSession.getContentType())
assertThat(initSidAuthenticationSession.body().jsonPath().get("message"), Matchers.containsString(errorMessage))
assertTrue(initSidAuthenticationSession.body().jsonPath().get("incident_nr").toString().size() > 15)
Steps.initSidAuthSession(flow, flow.sessionId, "60001019906", Collections.emptyMap())
Response pollResponse = Steps.pollSidResponse(flow, 1000L)
assertEquals("Correct HTTP status code is returned", 400, pollResponse.statusCode())
assertEquals("Correct Content-Type is returned", "application/json;charset=UTF-8", pollResponse.getContentType())
assertThat(pollResponse.body().jsonPath().get("message"), Matchers.containsString(errorMessage))
assertTrue(pollResponse.body().jsonPath().get("incident_nr").toString().size() > 15)

where:
login_locale | label || errorMessage
Expand Down

0 comments on commit a3e68a5

Please sign in to comment.