-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwebclient_example.rb
67 lines (56 loc) · 1.75 KB
/
webclient_example.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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