File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ def default_options
15
15
end
16
16
17
17
def headers
18
- env . dup . inject ( { } ) { |h , ( k , v ) | h [ k . to_s . downcase [ 5 ..-1 ] ] = v if k . downcase . to_s . start_with? ( 'http_' ) ; h }
18
+ env . dup . inject ( { } ) { |h , ( k , v ) | h [ k . to_s . downcase [ 5 ..-1 ] ] = v if k . to_s . downcase . start_with? ( 'http_' ) ; h }
19
19
end
20
20
21
21
def before
Original file line number Diff line number Diff line change @@ -182,12 +182,12 @@ def app; subject end
182
182
end
183
183
184
184
it 'should convert JSON bodies to params' do
185
- post '/request_body' , MultiJson . encode ( user : 'Bobby T.' ) , { 'CONTENT_TYPE' => 'application/json' }
185
+ post '/request_body' , MultiJson . encode ( :user => 'Bobby T.' ) , { 'CONTENT_TYPE' => 'application/json' }
186
186
last_response . body . should == 'Bobby T.'
187
187
end
188
188
189
189
it 'should convert JSON bodies to params' do
190
- put '/request_body' , MultiJson . encode ( user : 'Bobby T.' ) , { 'CONTENT_TYPE' => 'application/json' }
190
+ put '/request_body' , MultiJson . encode ( :user => 'Bobby T.' ) , { 'CONTENT_TYPE' => 'application/json' }
191
191
last_response . body . should == 'Bobby T.'
192
192
end
193
193
@@ -205,7 +205,7 @@ def app; subject end
205
205
subject . post '/omitted_params' do
206
206
body_params [ :version ] . should == nil
207
207
end
208
- post '/omitted_params' , MultiJson . encode ( user : 'Blah' ) , { 'CONTENT_TYPE' => 'application/json' }
208
+ post '/omitted_params' , MultiJson . encode ( :user => 'Blah' ) , { 'CONTENT_TYPE' => 'application/json' }
209
209
end
210
210
end
211
211
end
You can’t perform that action at this time.
0 commit comments