Sha256: 5f21f2b259a616e7ba1544c3286f4165dd971ce0165a2632c41e394409dcd7f8

Contents?: true

Size: 1.75 KB

Versions: 13

Compression:

Stored size: 1.75 KB

Contents

require 'example_helper'

module Examples
  module WebClient
    require 'ass_launcher'

    describe 'Get web client instanse for connect to infobase' do
      describe 'Whith URL of infobase' do
        extend AssLauncher::Api

        wc = web_client('http://host/path/infobase', '8.3.8')
        loc = wc.location do
          # Buld arguments
          _N 'user name'
          _P 'pass'
          _L 'en'
          testClientID 'id'
          debuggerURL 'http://debugger:5668'
        end

        it 'We get URI::HTTP instanse' do
          loc.must_be_instance_of URI::HTTP
        end

        it 'We get perfect string for connect to infobase' do
          loc.to_s.must_equal 'http://host/path/infobase?'\
            'DisableStartupMessages&'\
            'N=user%20name&'\
            'P=pass&'\
            'L=en&'\
            'TESTCLIENTID=id&'\
            'DebuggerURL=http%3A%2F%2Fdebugger%3A5668'
        end
      end

      describe 'Whith connection string' do
        extend AssLauncher::Api

        cs = cs_http(ws: 'http://host/path/infobase', usr: 'user name',
                    pwd: 'pass')
        wc = web_client(cs.uri, '8.3.8')

        loc = wc.location do
          # Buld arguments
          _L 'en'
          testClientID 'id'
          debuggerURL 'http://debugger:5668'
        end

        it 'We get URI::HTTP instanse' do
          loc.must_be_instance_of URI::HTTP
        end

        it 'We get perfect string for connect to infobase' do
          loc.to_s.must_equal 'http://host/path/infobase?'\
            'N=user%20name&'\
            'P=pass&'\
            'DisableStartupMessages&'\
            'L=en&'\
            'TESTCLIENTID=id&'\
            'DebuggerURL=http%3A%2F%2Fdebugger%3A5668'
        end

      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ass_launcher-0.7.0 examples/webclient_example.rb
ass_launcher-0.6.0 examples/webclient_example.rb
ass_launcher-0.5.0 examples/webclient_example.rb
ass_launcher-0.4.1 examples/webclient_example.rb
ass_launcher-0.4.0 examples/webclient_example.rb
ass_launcher-0.3.4 examples/webclient_example.rb
ass_launcher-0.3.3 examples/webclient_example.rb
ass_launcher-0.3.2 examples/webclient_example.rb
ass_launcher-0.3.1 examples/webclient_example.rb
ass_launcher-0.3.0 examples/webclient_example.rb
ass_launcher-0.2.2 examples/webclient_example.rb
ass_launcher-0.2.1 examples/webclient_example.rb
ass_launcher-0.2.0 examples/webclient_example.rb