@@ -30,6 +30,7 @@ class RubySamlTest < Minitest::Test
3030 let ( :response_no_statuscode ) { OneLogin ::RubySaml ::Response . new ( read_invalid_response ( "no_status_code.xml.base64" ) ) }
3131 let ( :response_statuscode_responder ) { OneLogin ::RubySaml ::Response . new ( read_invalid_response ( "status_code_responder.xml.base64" ) ) }
3232 let ( :response_statuscode_responder_and_msg ) { OneLogin ::RubySaml ::Response . new ( read_invalid_response ( "status_code_responer_and_msg.xml.base64" ) ) }
33+ let ( :response_double_statuscode ) { OneLogin ::RubySaml ::Response . new ( response_document_double_status_code ) }
3334 let ( :response_encrypted_attrs ) { OneLogin ::RubySaml ::Response . new ( response_document_encrypted_attrs ) }
3435 let ( :response_no_signed_elements ) { OneLogin ::RubySaml ::Response . new ( read_invalid_response ( "no_signature.xml.base64" ) ) }
3536 let ( :response_multiple_signed ) { OneLogin ::RubySaml ::Response . new ( read_invalid_response ( "multiple_signed.xml.base64" ) ) }
@@ -517,12 +518,12 @@ class RubySamlTest < Minitest::Test
517518 assert_empty response . errors
518519 end
519520
520- it "return false when the status if no Status provided" do
521+ it "return false when no Status provided" do
521522 assert !response_no_status . send ( :validate_success_status )
522523 assert_includes response_no_status . errors , "The status code of the Response was not Success"
523524 end
524525
525- it "return false when the status if no StatusCode provided" do
526+ it "return false when no StatusCode provided" do
526527 assert !response_no_statuscode . send ( :validate_success_status )
527528 assert_includes response_no_statuscode . errors , "The status code of the Response was not Success"
528529 end
@@ -536,6 +537,11 @@ class RubySamlTest < Minitest::Test
536537 assert !response_statuscode_responder_and_msg . send ( :validate_success_status )
537538 assert_includes response_statuscode_responder_and_msg . errors , "The status code of the Response was not Success, was Responder -> something_is_wrong"
538539 end
540+
541+ it "return false when the status is not 'Success'" do
542+ assert !response_double_statuscode . send ( :validate_success_status )
543+ assert_includes response_double_statuscode . errors , "The status code of the Response was not Success, was Requester => UnsupportedBinding"
544+ end
539545 end
540546
541547 describe "#validate_structure" do
0 commit comments