Skip to content

Commit

Permalink
Fixed test for no authn context
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Nov 10, 2023
1 parent 1cc81ef commit 46c0957
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import myconext.model.*;
import myconext.repository.ChallengeRepository;
import myconext.security.ACR;
import myconext.tiqr.SURFSecureID;
import org.apache.commons.io.IOUtils;
import org.apache.http.client.CookieStore;
import org.junit.Test;
Expand All @@ -39,8 +38,8 @@
import static io.restassured.RestAssured.when;
import static myconext.model.LinkedAccountTest.linkedAccount;
import static myconext.security.GuestIdpAuthenticationRequestFilter.BROWSER_SESSION_COOKIE_NAME;
import static myconext.security.GuestIdpAuthenticationRequestFilter.GUEST_IDP_REMEMBER_ME_COOKIE_NAME;
import static org.hamcrest.Matchers.*;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.*;

@SuppressWarnings("unchecked")
Expand Down Expand Up @@ -171,8 +170,9 @@ public void accountLinkingWithoutStudentAffiliation() throws IOException {
String samlResponse = this.samlResponse(magicLinkResponse);

assertTrue(samlResponse.contains("Your institution has not provided this affiliation"));
assertTrue(samlResponse.contains("urn:oasis:names:tc:SAML:2.0:status:Responder"));
assertTrue(samlResponse.contains("urn:oasis:names:tc:SAML:2.0:status:NoAuthnContext"));
assertTrue(samlResponse.contains("<saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified</saml2:AuthnContextClassRef>"));
assertFalse(samlResponse.contains("Assertion"));
assertFalse(samlResponse.contains(ACR.AFFILIATION_STUDENT));
}

Expand Down

0 comments on commit 46c0957

Please sign in to comment.