spec/shapewear/savon_usage_spec.rb in shapewear-0.1.4 vs spec/shapewear/savon_usage_spec.rb in shapewear-0.1.5

- old
+ new

@@ -14,11 +14,11 @@ describe "Savon" do it "should work for simple requests" do client = Savon::Client.new 'http://services.example.com/complete/soap/wsdl' response = client.request :echo_in_uppercase, :xmlns => 'http://services.example.com/v1' do - soap.body = { 'Text' => 'uppercase text' } + soap.body = { :text => 'uppercase text' } end puts response.inspect puts response.body.inspect @@ -26,22 +26,22 @@ end it "should work for structured responses from objects" do client = Savon::Client.new 'http://services.example.com/complete/soap/wsdl' response = client.request :get_structured_data, :xmlns => 'http://services.example.com/v1' do - soap.body = { 'Id' => 0 } + soap.body = { 'ID' => 0 } end r = response.body[:get_structured_data_response][:get_structured_data_result] r.should be_a Hash r.should include :text => 'text from the struct' end it "should work for structured responses from hashes" do client = Savon::Client.new 'http://services.example.com/complete/soap/wsdl' response = client.request :get_structured_data, :xmlns => 'http://services.example.com/v1' do - soap.body = { 'Id' => 1 } + soap.body = { 'ID' => 1 } end r = response.body[:get_structured_data_response][:get_structured_data_result] r.should be_a Hash r.should include :text => 'text from a hash' @@ -50,21 +50,21 @@ it "should raise SOAP 1.1 Faults" do client = Savon::Client.new 'http://services.example.com/complete/soap/wsdl' expect { client.request :get_structured_data, :xmlns => 'http://services.example.com/v1' do - soap.body = { 'Id' => 55 } + soap.body = { 'ID' => 55 } end }.to raise_error Savon::SOAP::Fault, "(e:Server.RuntimeError) ID must be 0 or 1" end it "should raise SOAP 1.2 Faults" do client = Savon::Client.new 'http://services.example.com/complete/soap/wsdl' expect { client.request :get_structured_data, :xmlns => 'http://services.example.com/v1' do soap.version = 2 - soap.body = { 'Id' => 55 } + soap.body = { 'ID' => 55 } end }.to raise_error Savon::SOAP::Fault, "(e:Server.RuntimeError) ID must be 0 or 1" end end end \ No newline at end of file