-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EDGPATRON-161] - Extend get API for /patron/registration-status with…
… {externalSystemId}
- Loading branch information
1 parent
6805054
commit e86aaa3
Showing
3 changed files
with
44 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -393,8 +393,8 @@ public void testGetPatronRegistrationStatusWithoutEmail(TestContext context) { | |
.response(); | ||
|
||
var jsonResponse = new JsonObject(response.body().asString()); | ||
assertEquals("IDENTIFIERS_NOT_PROVIDED", jsonResponse.getString("code")); | ||
assertEquals("Either emailId or externalSystemId must be provided in the request", jsonResponse.getString("errorMessage")); | ||
assertEquals("INVALID_IDENTIFIERS", jsonResponse.getString("code")); | ||
assertEquals("Either emailId or externalSystemId must be provided in the request.", jsonResponse.getString("errorMessage")); | ||
|
||
response = RestAssured | ||
.get(String.format("/patron/registration-status?emailId=%s&apikey=%s", "", apiKey)) | ||
|
@@ -405,10 +405,28 @@ public void testGetPatronRegistrationStatusWithoutEmail(TestContext context) { | |
.response(); | ||
|
||
jsonResponse = new JsonObject(response.body().asString()); | ||
assertEquals("IDENTIFIERS_NOT_PROVIDED", jsonResponse.getString("code")); | ||
assertEquals("Either emailId or externalSystemId must be provided in the request", jsonResponse.getString("errorMessage")); | ||
assertEquals("INVALID_IDENTIFIERS", jsonResponse.getString("code")); | ||
assertEquals("Either emailId or externalSystemId must be provided in the request.", jsonResponse.getString("errorMessage")); | ||
} | ||
|
||
@Test | ||
public void testGetPatronRegistrationStatusWithEmailAndESID(TestContext context) { | ||
|
||
var response = RestAssured | ||
.get(String.format("/patron/registration-status?emailId=%s&externalSystemId=%s&apikey=%s", "[email protected]", "9eb67301-6f6e-468f-9b1a-6134dc39a670", apiKey)) | ||
.then() | ||
.statusCode(400) | ||
.header(HttpHeaders.CONTENT_TYPE, APPLICATION_JSON) | ||
.extract() | ||
.response(); | ||
|
||
var jsonResponse = new JsonObject(response.body().asString()); | ||
assertEquals("INVALID_IDENTIFIERS", jsonResponse.getString("code")); | ||
assertEquals("Provide either emailId or externalSystemId, not both.", jsonResponse.getString("errorMessage")); | ||
|
||
} | ||
|
||
|
||
@Test | ||
public void testGetPatronRegistrationStatusWithActiveEmail(TestContext context) { | ||
|
||
|