Skip to content

Commit

Permalink
SIGA-255 fixed default values in tests for Smart-ID signing request
Browse files Browse the repository at this point in the history
  • Loading branch information
Steinhain committed Oct 9, 2020
1 parent a31e149 commit 25d9886
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ public void signWithSmartIdNonExistingSignatureProfile() throws Exception {
@Test
public void signWithSmartIdInvalidRole() throws Exception {
postCreateContainer(flow, asicContainersDataRequestWithDefault());
Response response = postSmartIdSigningInSession(flow, smartIdSigningRequest("EE", "LT", null, null, null, null, null, "", null));
Response response = postSmartIdSigningInSession(flow, smartIdSigningRequest("LT", null, null, null, null, null, "", null));

expectError(response, 400, INVALID_REQUEST);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ public void patchToHashcodeSmartIdCertificateStatus() throws NoSuchAlgorithmExce
@Test
public void signWithSmartIdInvalidRole() throws NoSuchAlgorithmException, InvalidKeyException, JSONException {
postCreateContainer(flow, hashcodeContainersDataRequestWithDefault());
Response response = postSmartIdSigningInSession(flow, smartIdSigningRequest("EE", "LT", null, null, null, null, null, "",null));
Response response = postSmartIdSigningInSession(flow, smartIdSigningRequest("LT", null, null, null, null, null, "",null));

expectError(response, 400, INVALID_REQUEST);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,11 @@ public static JSONObject smartIdCertificateChoiceRequest(String personIdentifier
}

public static JSONObject smartIdSigningRequestWithDefault(String signatureProfile, String documentNumber) throws JSONException {
return smartIdSigningRequest("EE", signatureProfile, documentNumber, "something", null, null,null, null, null);
return smartIdSigningRequest(signatureProfile, documentNumber, "something", null, null,null, null, null);
}

public static JSONObject smartIdSigningRequest(String originCountry, String signatureProfile, String documentNumber, String messageToDisplay, String city, String stateOrProvince, String postalCode, String country, String roles) throws JSONException {
public static JSONObject smartIdSigningRequest(String signatureProfile, String documentNumber, String messageToDisplay, String city, String stateOrProvince, String postalCode, String country, String roles) throws JSONException {
JSONObject request = new JSONObject();
request.put("country", originCountry);
request.put("signatureProfile", signatureProfile);
request.put("documentNumber", documentNumber);

Expand Down

0 comments on commit 25d9886

Please sign in to comment.