Sha256: 7b1943f76a1f0fbbbd610d740055a8e675b5bfd272d2a23f2e27aadf3d42a22e

Contents?: true

Size: 1.3 KB

Versions: 3

Compression:

Stored size: 1.3 KB

Contents

require 'spec_helper'

describe 'Integration with Authentication service' do

  subject(:client) { Sekken.new fixture('wsdl/authentication') }

  it 'returns a map of services and ports' do
    expect(client.services).to eq(
      'AuthenticationWebServiceImplService' => {
        :ports => {
          'AuthenticationWebServiceImplPort' => {
            :type     => 'http://schemas.xmlsoap.org/wsdl/soap/',
            :location => 'http://example.com/validation/1.0/AuthenticationService'
          }
        }
      }
    )
  end

  it 'knows the operations' do
    service = 'AuthenticationWebServiceImplService'
    port = 'AuthenticationWebServiceImplPort'

    operation = client.operation(service, port, 'authenticate')

    expect(operation.soap_action).to eq('')
    expect(operation.endpoint).to eq('http://example.com/validation/1.0/AuthenticationService')

    namespace = 'http://v1_0.ws.auth.order.example.com/'

    expect(operation.body_parts).to eq([
      [['authenticate'],             { namespace: namespace, form: 'qualified', singular: true }],
      [['authenticate', 'user'],     { namespace: namespace, form: 'unqualified', singular: true, type: 'xs:string' }],
      [['authenticate', 'password'], { namespace: namespace, form: 'unqualified', 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/authentication_spec.rb
sekken-0.2.0 spec/integration/authentication_spec.rb
sekken-0.1.0 spec/integration/authentication_spec.rb