features/steps/default_config.rb in hyperclient-0.8.5 vs features/steps/default_config.rb in hyperclient-0.8.6
- old
+ new
@@ -10,10 +10,10 @@
'Content-Type' => 'application/hal+json', 'Accept' => 'application/hal+json,application/json'
}
end
step 'I send some data to the API' do
- stub_request(:post, 'http://api.example.org/posts')
+ stub_request(:post, 'http://api.example.org/posts').to_return(headers: { 'Content-Type' => 'application/hal+json' })
assert_equal 200, api._links.posts._post(title: 'My first blog post')._response.status
end
step 'it should have been encoded as JSON' do
assert_requested :post, 'api.example.org/posts', body: '{"title":"My first blog post"}'