spec/savon/softlayer_spec.rb in savon-2.13.0 vs spec/savon/softlayer_spec.rb in savon-2.13.1
- old
+ new
@@ -18,11 +18,25 @@
:longName=>"Zertico LLC Reseller"
}
}
}
+ expected_namespaces = {
+ 'xmlns' => "http://schemas.xmlsoap.org/wsdl/",
+ 'xmlns:xsd' => "http://www.w3.org/2001/XMLSchema",
+ 'xmlns:xsi' => "http://www.w3.org/2001/XMLSchema-instance",
+ 'xmlns:tns' => "http://api.service.softlayer.com/soap/v3/",
+ 'xmlns:env' => "http://schemas.xmlsoap.org/soap/envelope/",
+ 'xmlns:soap' => "http://schemas.xmlsoap.org/wsdl/soap/",
+ 'xmlns:soap-enc' => "http://schemas.xmlsoap.org/soap/encoding/",
+ 'xmlns:wsdl' => "http://schemas.xmlsoap.org/wsdl/"
+ }
+
locals = Savon::LocalOptions.new(message)
builder = Savon::Builder.new(:create_object, wsdl, globals, locals)
- expect(builder.to_s).to include('<env:Envelope')
+
+ envelope = Nokogiri::XML(builder.to_s).xpath('./env:Envelope').first
+
+ expect(envelope.namespaces).to match(expected_namespaces)
end
end
end