spec/airborne/post_spec.rb in airborne-0.1.15 vs spec/airborne/post_spec.rb in airborne-0.1.16
- old
+ new
@@ -3,15 +3,15 @@
describe 'post' do
it 'should allow testing on post requests' do
mock_post('simple_post')
post '/simple_post', {}
- expect_json_types({status: :string, someNumber: :int})
+ expect_json_types(status: :string, someNumber: :int)
end
it 'should allow testing on post requests' do
url = 'http://www.example.com/simple_post'
stub_request(:post, url)
- post '/simple_post', 'hello', {content_type: "text/plain"}
- expect(WebMock).to have_requested(:post, url).with(:body => "hello", :headers => {'Content-Type' => 'text/plain'})
+ post '/simple_post', 'hello', content_type: 'text/plain'
+ expect(WebMock).to have_requested(:post, url).with(body: 'hello', headers: { 'Content-Type' => 'text/plain' })
end
end