Skip to content

Commit

Permalink
AUT-1078 Update Smart-ID tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Steinhain committed Dec 20, 2022
1 parent d1deecb commit 9f1b46f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/test/groovy/ee/ria/tara/AuthenticationSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class AuthenticationSpec extends TaraSpecification {
JWTClaimsSet claims = Steps.verifyTokenAndReturnSignedJwtObject(flow, tokenResponse.getBody().jsonPath().get("id_token")).getJWTClaimsSet()
assertThat(claims.getAudience().get(0), equalTo(flow.oidcClientPublic.clientId))
assertThat(claims.getSubject(), equalTo("EE30303039914"))
assertThat(claims.getJSONObjectClaim("profile_attributes").get("given_name"), equalTo("QUALIFIED OK1"))
assertThat(claims.getJSONObjectClaim("profile_attributes").get("given_name"), equalTo("OK"))
}

@Unroll
Expand Down
6 changes: 3 additions & 3 deletions src/test/groovy/ee/ria/tara/OidcUserInfoRequestSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ class OidcUserInfoRequestSpec extends TaraSpecification {
assertEquals("application/json; charset=utf-8", userInfoResponse.getContentType(), "Correct Content-Type is returned")

assertThat(userInfoResponse.getBody().jsonPath().getList("amr")[0].toString(), equalTo("smartid"))
assertThat(userInfoResponse.getBody().jsonPath().getString("given_name"), equalTo("QUALIFIED OK1"))
assertThat(userInfoResponse.getBody().jsonPath().getString("given_name"), equalTo("OK"))
assertThat(userInfoResponse.getBody().jsonPath().getString("sub"), equalTo("EE" + idCode))
assertThat(userInfoResponse.getBody().jsonPath().getString("date_of_birth"), equalTo("1903-03-03"))
assertThat(userInfoResponse.getBody().jsonPath().getString("family_name"), equalTo("TESTNUMBER"))
Expand All @@ -264,7 +264,7 @@ class OidcUserInfoRequestSpec extends TaraSpecification {
assertEquals(200, userInfoResponse.statusCode(), "Correct HTTP status code is returned")
assertEquals("application/json; charset=utf-8", userInfoResponse.getContentType(), "Correct Content-Type is returned")

assertThat(userInfoResponse.getBody().jsonPath().getString("given_name"), equalTo("QUALIFIED OK1"))
assertThat(userInfoResponse.getBody().jsonPath().getString("given_name"), equalTo("OK"))
assertThat(userInfoResponse.getBody().jsonPath().getString("sub"), equalTo("EE" + idCode))
assertThat(userInfoResponse.getBody().jsonPath().getString("date_of_birth"), equalTo("1903-03-03"))
assertThat(userInfoResponse.getBody().jsonPath().getString("family_name"), equalTo("TESTNUMBER"))
Expand All @@ -290,7 +290,7 @@ class OidcUserInfoRequestSpec extends TaraSpecification {
assertEquals(200, userInfoResponse.statusCode(), "Correct HTTP status code is returned")
assertEquals("application/json; charset=utf-8", userInfoResponse.getContentType(), "Correct Content-Type is returned")

assertThat(userInfoResponse.getBody().jsonPath().getString("given_name"), equalTo("QUALIFIED OK1"))
assertThat(userInfoResponse.getBody().jsonPath().getString("given_name"), equalTo("OK"))
assertThat(userInfoResponse.getBody().jsonPath().getString("sub"), equalTo("EE" + idCode))
assertThat(userInfoResponse.getBody().jsonPath().getString("date_of_birth"), equalTo("1903-03-03"))
assertThat(userInfoResponse.getBody().jsonPath().getString("family_name"), equalTo("TESTNUMBER"))
Expand Down
2 changes: 1 addition & 1 deletion src/test/groovy/ee/ria/tara/SmartIDAuthSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class SmartIDAuthSpec extends TaraSpecification {

where:
idCode | givenName | familyName | dateOfBirth | label
"39912319997" | "BOD" | "TESTNUMBER" | "1999-12-31" | "New certificate profile (no personal code in CN)"
"50701019992" | "MINOR" | "TESTNUMBER" | "2007-01-01" | "User age is under 18"
"30303039903" | "QUALIFIED OK" | "TESTNUMBER" | "1903-03-03" | "No numbers in names"
"30303039816" | "MULTIPLE OK" | "TESTNUMBER" | "1903-03-03" | "User has other active account"
}
Expand Down

0 comments on commit 9f1b46f

Please sign in to comment.