Skip to content

Commit

Permalink
Merge pull request #44 from IABTechLab/ian-UID2-2145-update-test-iden…
Browse files Browse the repository at this point in the history
…tities

update test identities
  • Loading branch information
Ian-Nara authored Nov 1, 2023
2 parents 4e686f7 + 56f1bc0 commit 769ed12
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/test/java/com/uid2/client/PublisherTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void integrationGenerateAndRefresh() {

@Test //this test requires these env vars to be configured: UID2_BASE_URL, UID2_API_KEY, UID2_SECRET_KEY
public void integrationOptOut() {
TokenGenerateResponse tokenGenerateResponse = publisherUid2Client.generateTokenResponse(TokenGenerateInput.fromEmail("optout@email.com"));
TokenGenerateResponse tokenGenerateResponse = publisherUid2Client.generateTokenResponse(TokenGenerateInput.fromEmail("refresh-optout@example.com"));
assertFalse(tokenGenerateResponse.isOptout());
IdentityTokens identity = tokenGenerateResponse.getIdentity();
assertNotNull(identity);
Expand Down Expand Up @@ -435,7 +435,7 @@ public void nullJsonStringThrowsNullException() {

@Test
public void optOutRefreshResponse() {
final String refreshResponseKey = "WL0AYr41Db9m6dCIPtQlTz2kE4NMx3nLmloGHkQPGSQ="; //derived by sending "optout@email.com" in a token generate request
final String refreshResponseKey = "WL0AYr41Db9m6dCIPtQlTz2kE4NMx3nLmloGHkQPGSQ="; //derived by sending "refresh-optout@example.com" in a token generate request
final String encryptedRefreshOptOutResponse = "d9I6qCdlJ6mkWYLyw2iGnCnJ5OocyQDtbbvW6YXAYKpxTXaOePQzPPJIrHnI7Io="; //derived by sending a refresh request using the refresh token from the generate request above

JsonObject json = new Gson().fromJson(expectedDecryptedJsonForTokenGenerateResponse, JsonObject.class);
Expand All @@ -452,7 +452,7 @@ public void optOutRefreshResponse() {

@Test
public void optOutGenerateTokenResponse() {
EnvelopeV2 envelope = createEnvelopeForTokenGenerateRequest(IdentityType.Email, "optout@email.com", null, true);
EnvelopeV2 envelope = createEnvelopeForTokenGenerateRequest(IdentityType.Email, "refresh-optout@example.com", null, true);
final String encryptedOptOutResponse = encrypt("{\"status\":\"optout\"}");
TokenGenerateResponse tokenGenerateResponse = publisherUid2Helper.createTokenGenerateResponse(encryptedOptOutResponse, envelope);
assertTrue(tokenGenerateResponse.isOptout());
Expand Down

0 comments on commit 769ed12

Please sign in to comment.