|
18 | 18 | let(:splits_api) { described_class.new('', config, telemetry_runtime_producer) } |
19 | 19 |
|
20 | 20 | it 'returns splits with segment names' do |
21 | | - stub_request(:get, 'https://sdk.split.io/api/splitChanges?since=-1') |
| 21 | + stub_request(:get, 'https://sdk.split.io/api/splitChanges?s=1.1&since=-1') |
22 | 22 | .to_return(status: 200, body: splits) |
23 | 23 |
|
24 | 24 | parsed_splits = splits_api.send(:splits_with_segment_names, splits) |
|
41 | 41 | let(:splits_api) { described_class.new('', config, telemetry_runtime_producer) } |
42 | 42 |
|
43 | 43 | it 'returns the splits - with 2 sets param' do |
44 | | - stub_request(:get, 'https://sdk.split.io/api/splitChanges?sets=set_1,set_2&since=-1') |
| 44 | + stub_request(:get, 'https://sdk.split.io/api/splitChanges?s=1.1&since=-1&sets=set_1,set_2') |
45 | 45 | .with(headers: { |
46 | 46 | 'Accept' => '*/*', |
47 | 47 | 'Accept-Encoding' => 'gzip', |
|
61 | 61 | end |
62 | 62 |
|
63 | 63 | it 'raise api exception when status 414' do |
64 | | - stub_request(:get, 'https://sdk.split.io/api/splitChanges?sets=set_1,set_2&since=-1') |
| 64 | + stub_request(:get, 'https://sdk.split.io/api/splitChanges?s=1.1&since=-1&sets=set_1,set_2') |
65 | 65 | .with(headers: { |
66 | 66 | 'Accept' => '*/*', |
67 | 67 | 'Accept-Encoding' => 'gzip', |
|
96 | 96 | let(:splits_api) { described_class.new('', config, telemetry_runtime_producer) } |
97 | 97 |
|
98 | 98 | it 'returns the splits - checking headers when cache_control_headers is false' do |
99 | | - stub_request(:get, 'https://sdk.split.io/api/splitChanges?since=-1') |
| 99 | + stub_request(:get, 'https://sdk.split.io/api/splitChanges?s=1.1&since=-1') |
100 | 100 | .with(headers: { |
101 | 101 | 'Accept' => '*/*', |
102 | 102 | 'Accept-Encoding' => 'gzip', |
|
115 | 115 | end |
116 | 116 |
|
117 | 117 | it 'returns the splits - with till param' do |
118 | | - stub_request(:get, 'https://sdk.split.io/api/splitChanges?since=-1&till=123123') |
| 118 | + stub_request(:get, 'https://sdk.split.io/api/splitChanges?s=1.1&since=-1&till=123123') |
119 | 119 | .with(headers: { |
120 | 120 | 'Accept' => '*/*', |
121 | 121 | 'Accept-Encoding' => 'gzip', |
|
135 | 135 | end |
136 | 136 |
|
137 | 137 | it 'returns the splits - checking headers when cache_control_headers is true' do |
138 | | - stub_request(:get, 'https://sdk.split.io/api/splitChanges?since=-1') |
| 138 | + stub_request(:get, 'https://sdk.split.io/api/splitChanges?s=1.1&since=-1') |
139 | 139 | .with(headers: { |
140 | 140 | 'Accept' => '*/*', |
141 | 141 | 'Accept-Encoding' => 'gzip', |
|
156 | 156 | end |
157 | 157 |
|
158 | 158 | it 'throws exception if request to get splits from API returns unexpected status code' do |
159 | | - stub_request(:get, 'https://sdk.split.io/api/splitChanges?since=-1') |
| 159 | + stub_request(:get, 'https://sdk.split.io/api/splitChanges?s=1.1&since=-1') |
160 | 160 | .to_return(status: 404) |
161 | 161 |
|
162 | 162 | expect { splits_api.since(-1) }.to raise_error( |
|
166 | 166 | end |
167 | 167 |
|
168 | 168 | it 'throws exception if request to get splits from API fails' do |
169 | | - stub_request(:get, 'https://sdk.split.io/api/splitChanges?since=-1') |
| 169 | + stub_request(:get, 'https://sdk.split.io/api/splitChanges?s=1.1&since=-1') |
170 | 170 | .to_raise(StandardError) |
171 | 171 |
|
172 | 172 | expect { splits_api.since(-1) }.to raise_error( |
|
175 | 175 | end |
176 | 176 |
|
177 | 177 | it 'throws exception if request to get splits from API times out' do |
178 | | - stub_request(:get, 'https://sdk.split.io/api/splitChanges?since=-1') |
| 178 | + stub_request(:get, 'https://sdk.split.io/api/splitChanges?s=1.1&since=-1') |
179 | 179 | .to_timeout |
180 | 180 |
|
181 | 181 | expect { splits_api.since(-1) }.to raise_error( |
|
0 commit comments