From 98990c2b501e5da90b2296d0733b1845a5d983c5 Mon Sep 17 00:00:00 2001 From: Bryan Maass Date: Fri, 26 Apr 2024 14:04:47 -0600 Subject: [PATCH] rearrange tests --- test/saml20_clj/sp/request_test.clj | 22 +++++----------------- test/saml20_clj/sp/response_test.clj | 2 +- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/test/saml20_clj/sp/request_test.clj b/test/saml20_clj/sp/request_test.clj index f43df88..3e844fe 100644 --- a/test/saml20_clj/sp/request_test.clj +++ b/test/saml20_clj/sp/request_test.clj @@ -202,28 +202,16 @@ :idp-url "http://idp.example.com/SSOService.php" :issuer "http://sp.example.com/demo1/metadata.php"}))] (is (= [:samlp:LogoutRequest - {:xmlns:samlp "urn:oasis:names:tc:SAML:2.0:protocol" + {:xmlns "urn:oasis:names:tc:SAML:2.0:protocol" + :xmlns:samlp "urn:oasis:names:tc:SAML:2.0:protocol" :xmlns:saml "urn:oasis:names:tc:SAML:2.0:assertion" :Version "2.0" :ID "ONELOGIN_109707f0030a5d00620c9d9df97f627afe9dcc24" :IssueInstant "2020-09-24T22:51:00Z" :Destination "http://idp.example.com/SSOService.php"} - [:saml:Issuer "http://sp.example.com/demo1/metadata.php"] - [:saml:NameID {:Format "urn:oasis:names:tc:SAML:2.0:nameid-format:emailAddress"} "user@example.com"] - [:samlp:SessionIndex "SessionIndex_From_Authentication_Assertion"]] - logout-xml)) - (is (= (str "" "\n" - "" - "http://sp.example.com/demo1/metadata.php" - "user@example.com" - "SessionIndex_From_Authentication_Assertion" - "") - (coerce/->xml-string logout-xml))))) + [:Issuer "http://sp.example.com/demo1/metadata.php"] + [:NameID {:Format "urn:oasis:names:tc:SAML:2.0:nameid-format:emailAddress"} "user@example.com"]] + logout-xml)))) (t/with-clock (t/mock-clock (t/instant "2020-09-24T22:51:00.000Z")) (request/logout-redirect-location diff --git a/test/saml20_clj/sp/response_test.clj b/test/saml20_clj/sp/response_test.clj index f4529fc..38c9366 100644 --- a/test/saml20_clj/sp/response_test.clj +++ b/test/saml20_clj/sp/response_test.clj @@ -47,7 +47,7 @@ (testing (str "\noriginal =\n" (coerce/->xml-string original)) (testing (str "decrypted =\n" (coerce/->xml-string decrypted)) (prn :original (coerce/->xml-string original)) - (prn :descrypted (coerce/->xml-string decrypted)) + (prn :decrypted (coerce/->xml-string decrypted)) (is (= 0 (count (.getEncryptedAssertions decrypted)))) (is (= 1