@@ -32,7 +32,7 @@ class MetadataTest < Minitest::Test
3232 assert_equal "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" , REXML ::XPath . first ( xml_doc , "//md:NameIDFormat" ) . text . strip
3333
3434 assert_equal "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" , acs . attribute ( "Binding" ) . value
35- assert_equal "https://foo.example/saml/consume" , acs . attribute ( "Location" ) . value
35+ assert_equal "https://foo.example/saml/consume" , acs . attribute ( "Location" ) . value
3636
3737 assert validate_xml! ( xml_text , "saml-schema-metadata-2.0.xsd" )
3838 end
@@ -225,7 +225,7 @@ class MetadataTest < Minitest::Test
225225 before do
226226 settings . attribute_consuming_service . configure do
227227 service_name "Test Service"
228- add_attribute ( :name => " Name" , :name_format => " Name Format" , :friendly_name => " Friendly Name" , :attribute_value => [ " Attribute Value One" , "Attribute Value Two" ] )
228+ add_attribute ( :name => ' Name' , :name_format => ' Name Format' , :friendly_name => ' Friendly Name' , :attribute_value => [ ' Attribute Value One' , false ] )
229229 end
230230 end
231231
@@ -240,20 +240,20 @@ class MetadataTest < Minitest::Test
240240
241241 attribute_values = REXML ::XPath . match ( xml_doc , "//saml:AttributeValue" ) . map ( &:text )
242242 assert_equal "Attribute Value One" , attribute_values [ 0 ]
243- assert_equal "Attribute Value Two" , attribute_values [ 1 ]
243+ assert_equal 'false' , attribute_values [ 1 ]
244244
245245 assert validate_xml! ( xml_text , "saml-schema-metadata-2.0.xsd" )
246246 end
247247 end
248248
249249 describe "when attribute service is configured" do
250- let ( :attr_svc ) { REXML ::XPath . first ( xml_doc , " //md:AttributeConsumingService" ) }
251- let ( :req_attr ) { REXML ::XPath . first ( xml_doc , " //md:RequestedAttribute" ) }
250+ let ( :attr_svc ) { REXML ::XPath . first ( xml_doc , ' //md:AttributeConsumingService' ) }
251+ let ( :req_attr ) { REXML ::XPath . first ( xml_doc , ' //md:RequestedAttribute' ) }
252252
253253 before do
254254 settings . attribute_consuming_service . configure do
255255 service_name "Test Service"
256- add_attribute ( :name => "Name" , :name_format => "Name Format" , :friendly_name => "Friendly Name" , :attribute_value => "Attribute Value" )
256+ add_attribute ( :name => 'active' , :name_format => 'format' , :friendly_name => 'Active' , :attribute_value => true )
257257 end
258258 end
259259
@@ -262,10 +262,10 @@ class MetadataTest < Minitest::Test
262262 assert_equal "1" , attr_svc . attribute ( "index" ) . value
263263 assert_equal REXML ::XPath . first ( xml_doc , "//md:ServiceName" ) . text . strip , "Test Service"
264264
265- assert_equal "Name" , req_attr . attribute ( " Name" ) . value
266- assert_equal "Name Format" , req_attr . attribute ( " NameFormat" ) . value
267- assert_equal "Friendly Name" , req_attr . attribute ( " FriendlyName" ) . value
268- assert_equal "Attribute Value" , REXML ::XPath . first ( xml_doc , " //saml:AttributeValue" ) . text . strip
265+ assert_equal 'active' , req_attr . attribute ( ' Name' ) . value
266+ assert_equal 'format' , req_attr . attribute ( ' NameFormat' ) . value
267+ assert_equal 'Active' , req_attr . attribute ( ' FriendlyName' ) . value
268+ assert_equal 'true' , REXML ::XPath . first ( xml_doc , ' //saml:AttributeValue' ) . text . strip
269269
270270 assert validate_xml! ( xml_text , "saml-schema-metadata-2.0.xsd" )
271271 end
@@ -303,7 +303,7 @@ class MetadataTest < Minitest::Test
303303 assert_match %r[<ds:SignatureMethod Algorithm='http://www.w3.org/2000/09/xmldsig#rsa-sha1'/>] , xml_text
304304 assert_match %r[<ds:DigestMethod Algorithm='http://www.w3.org/2000/09/xmldsig#sha1'/>] , xml_text
305305 signed_metadata = XMLSecurity ::SignedDocument . new ( xml_text )
306- assert signed_metadata . validate_document ( ruby_saml_cert_fingerprint , false )
306+ assert signed_metadata . validate_document ( ruby_saml_cert_fingerprint , false )
307307
308308 assert validate_xml! ( xml_text , "saml-schema-metadata-2.0.xsd" )
309309 end
@@ -321,7 +321,7 @@ class MetadataTest < Minitest::Test
321321
322322 signed_metadata_2 = XMLSecurity ::SignedDocument . new ( xml_text )
323323
324- assert signed_metadata_2 . validate_document ( ruby_saml_cert_fingerprint , false )
324+ assert signed_metadata_2 . validate_document ( ruby_saml_cert_fingerprint , false )
325325
326326 assert validate_xml! ( xml_text , "saml-schema-metadata-2.0.xsd" )
327327 end
0 commit comments