Sha256: 987de4a3fda34dc97bd8287cd6555bb19a74a6cb73cca7a28709ae97ec347c39

Contents?: true

Size: 1.53 KB

Versions: 3

Compression:

Stored size: 1.53 KB

Contents

require "spec_helper"

describe Wasabi::Document do
  context "with: multiple_namespaces.wsdl" do

    subject { Wasabi::Document.new fixture(:multiple_namespaces).read }

    describe '#namespace' do
      subject { super().namespace }
      it { should == "http://example.com/actions" }
    end

    describe '#endpoint' do
      subject { super().endpoint }
      it { should == URI("http://example.com:1234/soap") }
    end

    describe '#element_form_default' do
      subject { super().element_form_default }
      it { should == :qualified }
    end

    it 'has 1 operation' do
      expect(subject.operations.size).to eq(1)
    end

    describe '#operations' do
      subject { super().operations }
      it do
      should == { :save => { :input => "Save", :output=>"SaveResponse", :action => "http://example.com/actions.Save", :namespace_identifier => "actions", :parameters => { :article => { :name => "article", :type => "Article" } } } }
    end
    end

    describe '#type_namespaces' do
      subject { super().type_namespaces }
      it do
      should =~ [
        [["Save"], "http://example.com/actions"],
        [["Save", "article"], "http://example.com/actions"],
        [["Article"], "http://example.com/article"],
        [["Article", "Author"], "http://example.com/article"],
        [["Article", "Title"], "http://example.com/article"]
      ]
    end
    end

    describe '#type_definitions' do
      subject { super().type_definitions }
      it do
      should =~ [ [["Save", "article"], "Article"] ]
    end
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wasabi-3.5.0 spec/wasabi/document/multiple_namespaces_spec.rb
wasabi-3.4.0 spec/wasabi/document/multiple_namespaces_spec.rb
wasabi-3.3.1 spec/wasabi/document/multiple_namespaces_spec.rb