Sha256: cd78cf52025c09b002d94e9b6146acad328144127e14dfffbe231e87358588cb

Contents?: true

Size: 950 Bytes

Versions: 15

Compression:

Stored size: 950 Bytes

Contents

require "spec_helper"
require "integration/support/server"

describe Savon::Message do

  before do
    @server = IntegrationServer.run
  end

  after do
    @server.stop
  end

  context "with a qualified message" do
    it "converts request Hash keys for which there is not namespace" do
      client = Savon.client(
        :endpoint => @server.url(:repeat),
        :namespace => 'http://example.com',
        :log => false,

        :element_form_default => :qualified,
        :convert_request_keys_to => :camelcase,

        :convert_response_tags_to => nil
      )

      message = {
       :email_count => 3,
       :user_name   => 'josh',
       :order!      => [:user_name, :email_count]
      }

      response = client.call(:something, :message => message)
      body = response.hash['Envelope']['Body']

      expect(response.xml).to include('<wsdl:UserName>josh</wsdl:UserName><wsdl:EmailCount>3</wsdl:EmailCount>')
    end
  end

end

Version data entries

15 entries across 15 versions & 3 rubygems

Version Path
savon-2.8.0 spec/savon/message_spec.rb
savon-2.7.2 spec/savon/message_spec.rb
savon-2.7.1 spec/savon/message_spec.rb
savon-2.7.0 spec/savon/message_spec.rb
savon-2.6.0 spec/savon/message_spec.rb
savon-2.5.1 spec/savon/message_spec.rb
savon-2.5.0 spec/savon/message_spec.rb
savon_with_adapter-2.4.1 spec/savon/message_spec.rb
savon-2.4.0 spec/savon/message_spec.rb
savon-2.3.3 spec/savon/message_spec.rb
savon-2.3.2 spec/savon/message_spec.rb
savon-2.3.1 spec/savon/message_spec.rb
savon-ng-1.6-2.4.1 spec/savon/message_spec.rb
savon-ng-1.6-2.4.0 spec/savon/message_spec.rb
savon-2.3.0 spec/savon/message_spec.rb