Sha256: 9f16092281f5b818a36f2dfa4e67bf779374af9fc177f87e4e25f0b01a87ea29

Contents?: true

Size: 1.02 KB

Versions: 19

Compression:

Stored size: 1.02 KB

Contents

require 'helper'
require 'lolsoap/wsdl'

class LolSoap::WSDL
  describe Type do
    let(:elements) { { 'soapColor' => OpenStruct.new(:type => Object.new) } }

    subject { Type.new('WashHandsRequest', 'prfx', elements, {}) }

    describe '#prefix' do
      it 'returns the prefix' do
        subject.prefix.must_equal 'prfx'
      end
    end

    describe '#elements' do
      it 'returns a hash of all elements' do
        subject.elements.must_equal(elements)
      end
    end

    describe '#element' do
      it 'returns a specific element' do
        subject.element('soapColor').must_equal elements['soapColor']
      end

      it 'returns a null object when there is no element' do
        subject.element('lol').must_equal NullElement.new
      end
    end

    describe '#sub_type' do
      it 'returns the type of a specific element' do
        subject.sub_type('soapColor').must_equal elements['soapColor'].type
      end
    end

    describe '#inspect' do
      it 'works' do
        subject.inspect
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
lolsoap-0.11.0 test/unit/wsdl/test_type.rb
lolsoap-0.10.0 test/unit/wsdl/test_type.rb
lolsoap-0.9.0 test/unit/wsdl/test_type.rb
lolsoap-0.8.3 test/unit/wsdl/test_type.rb
lolsoap-0.8.2 test/unit/wsdl/test_type.rb
lolsoap-0.8.1 test/unit/wsdl/test_type.rb
lolsoap-0.8.0 test/unit/wsdl/test_type.rb
lolsoap-0.7.0 test/unit/wsdl/test_type.rb
lolsoap-0.6.1 test/unit/wsdl/test_type.rb
lolsoap-0.6.0 test/unit/wsdl/test_type.rb
lolsoap-0.5.1 test/unit/wsdl/test_type.rb
lolsoap-0.5.0 test/unit/wsdl/test_type.rb
lolsoap-0.4.2 test/unit/wsdl/test_type.rb
lolsoap-0.4.1 test/unit/wsdl/test_type.rb
lolsoap-0.4.0 test/unit/wsdl/test_type.rb
lolsoap-0.3.2 test/unit/wsdl/test_type.rb
lolsoap-0.3.1 test/unit/wsdl/test_type.rb
lolsoap-0.3.0 test/unit/wsdl/test_type.rb
lolsoap-0.2.0 test/unit/wsdl/test_type.rb