@@ -35,7 +35,7 @@ def test_raises_on_missing_non_nullable_opts
35
35
end
36
36
37
37
def test_client_default_request_default_retry_attempts
38
- stub_request ( :get , "http://localhost/api/where/current-time.json?key" ) . to_return_json (
38
+ stub_request ( :get , "http://localhost/api/where/current-time.json?key=My%20API%20Key " ) . to_return_json (
39
39
status : 500 ,
40
40
body : { }
41
41
)
@@ -50,7 +50,7 @@ def test_client_default_request_default_retry_attempts
50
50
end
51
51
52
52
def test_client_given_request_default_retry_attempts
53
- stub_request ( :get , "http://localhost/api/where/current-time.json?key" ) . to_return_json (
53
+ stub_request ( :get , "http://localhost/api/where/current-time.json?key=My%20API%20Key " ) . to_return_json (
54
54
status : 500 ,
55
55
body : { }
56
56
)
@@ -66,7 +66,7 @@ def test_client_given_request_default_retry_attempts
66
66
end
67
67
68
68
def test_client_default_request_given_retry_attempts
69
- stub_request ( :get , "http://localhost/api/where/current-time.json?key" ) . to_return_json (
69
+ stub_request ( :get , "http://localhost/api/where/current-time.json?key=My%20API%20Key " ) . to_return_json (
70
70
status : 500 ,
71
71
body : { }
72
72
)
@@ -81,7 +81,7 @@ def test_client_default_request_given_retry_attempts
81
81
end
82
82
83
83
def test_client_given_request_given_retry_attempts
84
- stub_request ( :get , "http://localhost/api/where/current-time.json?key" ) . to_return_json (
84
+ stub_request ( :get , "http://localhost/api/where/current-time.json?key=My%20API%20Key " ) . to_return_json (
85
85
status : 500 ,
86
86
body : { }
87
87
)
@@ -97,7 +97,7 @@ def test_client_given_request_given_retry_attempts
97
97
end
98
98
99
99
def test_client_retry_after_seconds
100
- stub_request ( :get , "http://localhost/api/where/current-time.json?key" ) . to_return_json (
100
+ stub_request ( :get , "http://localhost/api/where/current-time.json?key=My%20API%20Key " ) . to_return_json (
101
101
status : 500 ,
102
102
headers : { "retry-after" => "1.3" } ,
103
103
body : { }
@@ -115,7 +115,7 @@ def test_client_retry_after_seconds
115
115
end
116
116
117
117
def test_client_retry_after_date
118
- stub_request ( :get , "http://localhost/api/where/current-time.json?key" ) . to_return_json (
118
+ stub_request ( :get , "http://localhost/api/where/current-time.json?key=My%20API%20Key " ) . to_return_json (
119
119
status : 500 ,
120
120
headers : { "retry-after" => ( Time . now + 10 ) . httpdate } ,
121
121
body : { }
@@ -135,7 +135,7 @@ def test_client_retry_after_date
135
135
end
136
136
137
137
def test_client_retry_after_ms
138
- stub_request ( :get , "http://localhost/api/where/current-time.json?key" ) . to_return_json (
138
+ stub_request ( :get , "http://localhost/api/where/current-time.json?key=My%20API%20Key " ) . to_return_json (
139
139
status : 500 ,
140
140
headers : { "retry-after-ms" => "1300" } ,
141
141
body : { }
@@ -153,7 +153,7 @@ def test_client_retry_after_ms
153
153
end
154
154
155
155
def test_retry_count_header
156
- stub_request ( :get , "http://localhost/api/where/current-time.json?key" ) . to_return_json (
156
+ stub_request ( :get , "http://localhost/api/where/current-time.json?key=My%20API%20Key " ) . to_return_json (
157
157
status : 500 ,
158
158
body : { }
159
159
)
@@ -170,7 +170,7 @@ def test_retry_count_header
170
170
end
171
171
172
172
def test_omit_retry_count_header
173
- stub_request ( :get , "http://localhost/api/where/current-time.json?key" ) . to_return_json (
173
+ stub_request ( :get , "http://localhost/api/where/current-time.json?key=My%20API%20Key " ) . to_return_json (
174
174
status : 500 ,
175
175
body : { }
176
176
)
@@ -187,7 +187,7 @@ def test_omit_retry_count_header
187
187
end
188
188
189
189
def test_overwrite_retry_count_header
190
- stub_request ( :get , "http://localhost/api/where/current-time.json?key" ) . to_return_json (
190
+ stub_request ( :get , "http://localhost/api/where/current-time.json?key=My%20API%20Key " ) . to_return_json (
191
191
status : 500 ,
192
192
body : { }
193
193
)
@@ -204,7 +204,7 @@ def test_overwrite_retry_count_header
204
204
end
205
205
206
206
def test_client_redirect_307
207
- stub_request ( :get , "http://localhost/api/where/current-time.json?key" ) . to_return_json (
207
+ stub_request ( :get , "http://localhost/api/where/current-time.json?key=My%20API%20Key " ) . to_return_json (
208
208
status : 307 ,
209
209
headers : { "location" => "/redirected" } ,
210
210
body : { }
@@ -233,7 +233,7 @@ def test_client_redirect_307
233
233
end
234
234
235
235
def test_client_redirect_303
236
- stub_request ( :get , "http://localhost/api/where/current-time.json?key" ) . to_return_json (
236
+ stub_request ( :get , "http://localhost/api/where/current-time.json?key=My%20API%20Key " ) . to_return_json (
237
237
status : 303 ,
238
238
headers : { "location" => "/redirected" } ,
239
239
body : { }
@@ -257,7 +257,7 @@ def test_client_redirect_303
257
257
end
258
258
259
259
def test_client_redirect_auth_keep_same_origin
260
- stub_request ( :get , "http://localhost/api/where/current-time.json?key" ) . to_return_json (
260
+ stub_request ( :get , "http://localhost/api/where/current-time.json?key=My%20API%20Key " ) . to_return_json (
261
261
status : 307 ,
262
262
headers : { "location" => "/redirected" } ,
263
263
body : { }
@@ -284,7 +284,7 @@ def test_client_redirect_auth_keep_same_origin
284
284
end
285
285
286
286
def test_client_redirect_auth_strip_cross_origin
287
- stub_request ( :get , "http://localhost/api/where/current-time.json?key" ) . to_return_json (
287
+ stub_request ( :get , "http://localhost/api/where/current-time.json?key=My%20API%20Key " ) . to_return_json (
288
288
status : 307 ,
289
289
headers : { "location" => "https://example.com/redirected" } ,
290
290
body : { }
@@ -307,7 +307,7 @@ def test_client_redirect_auth_strip_cross_origin
307
307
end
308
308
309
309
def test_default_headers
310
- stub_request ( :get , "http://localhost/api/where/current-time.json?key" ) . to_return_json (
310
+ stub_request ( :get , "http://localhost/api/where/current-time.json?key=My%20API%20Key " ) . to_return_json (
311
311
status : 200 ,
312
312
body : { }
313
313
)
0 commit comments