Sha256: 175f5f22d749ee24c52f1d7687b8fa3a030801812e108d1212ed978bfefe00e1
Contents?: true
Size: 1.72 KB
Versions: 3
Compression:
Stored size: 1.72 KB
Contents
require 'spec_helper' describe 'Integration with TeamSoftware' do subject(:client) { Sekken.new(wsdl_url, http_mock) } let(:wsdl_url) { 'http://bydexchange.nbs-us.com/BYDExchangeServer.svc?wsdl' } before do http_mock.fake_request(wsdl_url, 'wsdl/team_software/team_software.wsdl') # 4 schemas to import. # # XXX: actually some of the imported schemas import some of the other schemas, # but it seems like we're not following those?! schema_import_base = 'https://winteamservicestest.myteamsoftware.com/Services.svc?xsd=xsd%d' (0..3).each do |i| url = schema_import_base % i http_mock.fake_request(url, "wsdl/team_software/team_software#{i}.xsd") end end it 'returns a map of services and ports' do expect(client.services).to eq( 'ServiceManager' => { :ports => { 'BasicHttpBinding_IWinTeamServiceManager' => { :type => 'http://schemas.xmlsoap.org/wsdl/soap/', :location => 'https://winteamservicestest.myteamsoftware.com/Services.svc' } } } ) end it 'knows the operations' do service, port = 'ServiceManager', 'BasicHttpBinding_IWinTeamServiceManager' operation = client.operation(service, port, 'Login') expect(operation.soap_action).to eq('http://tempuri.org/IWinTeamServiceManager/Login') expect(operation.endpoint).to eq('https://winteamservicestest.myteamsoftware.com/Services.svc') namespace = 'http://tempuri.org/' expect(operation.body_parts).to eq([ [['Login'], { namespace: namespace, form: 'qualified', singular: true }], [['Login', 'MappingKey'], { namespace: namespace, form: 'qualified', singular: true, type: 'xs:string' }] ]) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
sekken-0.3.0 | spec/integration/team_software_spec.rb |
sekken-0.2.0 | spec/integration/team_software_spec.rb |
sekken-0.1.0 | spec/integration/team_software_spec.rb |