Sha256: 7c9795bbb63cafb20a972a9fefede12c022fc97f5f5dcd14e783ab8d7a08e0e8

Contents?: true

Size: 1.54 KB

Versions: 17

Compression:

Stored size: 1.54 KB

Contents

require File.join(File.dirname(__FILE__), "..", "spec_helper")

describe Savon::WSDL do
  include SpecHelper

  #namespace_uri
  describe "namespace_uri" do
    before { @wsdl = new_wsdl }

    it "returns the namespace URI from the WSDL" do
      @wsdl.namespace_uri == UserFixture.namespace_uri
    end

    it "returns the same object every time" do
      @wsdl.namespace_uri.should equal(@wsdl.namespace_uri)
    end
  end

  # soap_actions
  describe "soap_actions" do
    before { @wsdl = new_wsdl }

    it "returns the SOAP actions from the WSDL" do
      @wsdl.soap_actions == UserFixture.soap_actions
    end

    it "returns the same object every time" do
      @wsdl.soap_actions.should equal(@wsdl.soap_actions)
    end
  end

  # choice_elements
  describe "choice_elements" do
    before { @wsdl = new_wsdl }

    it "returns the choice elements from the WSDL" do
      @wsdl.choice_elements == UserFixture.choice_elements
    end

    it "returns the same object every time" do
      @wsdl.choice_elements.should equal(@wsdl.choice_elements)
    end
  end

  # initialize
  describe "initialize" do
    it "expects an endpoint URI and a Net::HTTP instance" do
      @wsdl = Savon::WSDL.new(some_uri, some_http)
    end
  end

  # to_s
  describe "to_s" do
    before { @wsdl = new_wsdl }

    it "returns nil before the WSDL document was retrieved" do
      @wsdl.to_s.should be_nil
    end

    it "returns the response body when available" do
      @wsdl.soap_actions # trigger http request
      @wsdl.to_s.should == UserFixture.user_wsdl
    end
  end
end

Version data entries

17 entries across 17 versions & 3 rubygems

Version Path
rubiii-savon-0.2.0 spec/savon/wsdl_spec.rb
rubiii-savon-0.2.1 spec/savon/wsdl_spec.rb
rubiii-savon-0.2.2 spec/savon/wsdl_spec.rb
rubiii-savon-0.2.3 spec/savon/wsdl_spec.rb
rubiii-savon-0.2.4 spec/savon/wsdl_spec.rb
rubiii-savon-0.2.5 spec/savon/wsdl_spec.rb
rubiii-savon-0.2.6 spec/savon/wsdl_spec.rb
smacks-savon-0.2.0 spec/savon/wsdl_spec.rb
savon-0.3.2 spec/savon/wsdl_spec.rb
savon-0.3.1 spec/savon/wsdl_spec.rb
savon-0.3.0 spec/savon/wsdl_spec.rb
savon-0.2.12 spec/savon/wsdl_spec.rb
savon-0.2.11 spec/savon/wsdl_spec.rb
savon-0.2.10 spec/savon/wsdl_spec.rb
savon-0.2.9 spec/savon/wsdl_spec.rb
savon-0.2.8 spec/savon/wsdl_spec.rb
savon-0.2.7 spec/savon/wsdl_spec.rb