File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ def default_options
1515 end
1616
1717 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 }
1919 end
2020
2121 def before
Original file line number Diff line number Diff line change @@ -182,12 +182,12 @@ def app; subject end
182182 end
183183
184184 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' }
186186 last_response . body . should == 'Bobby T.'
187187 end
188188
189189 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' }
191191 last_response . body . should == 'Bobby T.'
192192 end
193193
@@ -205,7 +205,7 @@ def app; subject end
205205 subject . post '/omitted_params' do
206206 body_params [ :version ] . should == nil
207207 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' }
209209 end
210210 end
211211 end
You can’t perform that action at this time.
0 commit comments