Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use method, not Moose interals in tests #210

Merged
merged 1 commit into from
Apr 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions t/21-artifact-response.t
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ isa_ok($assertion, "Net::SAML2::Protocol::Assertion");

is($assertion->valid("https://netsaml2-testapp.local"), "1", "Assertion is Valid - ok");

is($assertion->{in_response_to}, 'NETSAML2_2b2bcaa750d745ed5ffec2e3cc3a905ab855de0f7970d9391427641a720e6a97', "Assertion InResponseTo - ok");
is($assertion->in_response_to, 'NETSAML2_2b2bcaa750d745ed5ffec2e3cc3a905ab855de0f7970d9391427641a720e6a97', "Assertion InResponseTo - ok");

is($assertion->{id}, 'ID_ef9c4328-63de-4d55-ae05-e5342e67f36c', "Assertion ID - ok");
is($assertion->id, 'ID_ef9c4328-63de-4d55-ae05-e5342e67f36c', "Assertion ID - ok");

$assertion = Net::SAML2::Protocol::Assertion->new_from_xml(
xml => $assertion_artifact->get_response(),
Expand All @@ -106,9 +106,9 @@ isa_ok($assertion, "Net::SAML2::Protocol::Assertion", "from get_response");

is($assertion->valid("https://netsaml2-testapp.local"), "1", "Assertion is Valid - ok");

is($assertion->{in_response_to}, 'NETSAML2_2b2bcaa750d745ed5ffec2e3cc3a905ab855de0f7970d9391427641a720e6a97', "Assertion InResponseTo - ok");
is($assertion->in_response_to, 'NETSAML2_2b2bcaa750d745ed5ffec2e3cc3a905ab855de0f7970d9391427641a720e6a97', "Assertion InResponseTo - ok");

is($assertion->{id}, 'ID_ef9c4328-63de-4d55-ae05-e5342e67f36c', "Assertion ID - ok");
is($assertion->id, 'ID_ef9c4328-63de-4d55-ae05-e5342e67f36c', "Assertion ID - ok");

########################################
# LogoutResponse from ArtifactResponse #
Expand All @@ -127,9 +127,9 @@ isa_ok($logout, "Net::SAML2::Protocol::LogoutResponse");

ok($logout->success(), "Logout Response has a Success");

is($logout->{response_to}, 'NETSAML2_0b499739aa1d76eb80093a068053b8fee62cade60f7dc27826d0f13b19cad16a', "Logout Response InResponseTo - ok");
is($logout->response_to, 'NETSAML2_0b499739aa1d76eb80093a068053b8fee62cade60f7dc27826d0f13b19cad16a', "Logout Response InResponseTo - ok");

is($logout->{id}, 'ID_bfc25851-4da2-4420-8240-9103b77b12dc', "Logout Response Id - ok");
is($logout->id, 'ID_bfc25851-4da2-4420-8240-9103b77b12dc', "Logout Response Id - ok");

$logout = Net::SAML2::Protocol::LogoutResponse->new_from_xml(
xml => $logout_artifact->get_response(),
Expand All @@ -139,6 +139,6 @@ isa_ok($logout, "Net::SAML2::Protocol::LogoutResponse", "from get_response");

ok($logout->success(), "Logout Response has a Success");

is($logout->{response_to}, 'NETSAML2_0b499739aa1d76eb80093a068053b8fee62cade60f7dc27826d0f13b19cad16a', "Logout Response InResponseTo - ok");
is($logout->response_to, 'NETSAML2_0b499739aa1d76eb80093a068053b8fee62cade60f7dc27826d0f13b19cad16a', "Logout Response InResponseTo - ok");

done_testing;