Skip to content

Commit

Permalink
the preflight request fails before the OPTIONS request is stubbed out
Browse files Browse the repository at this point in the history
  • Loading branch information
rimian committed Feb 27, 2016
1 parent 65b8e79 commit 09c3380
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions spec/features/examples/preflight_request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
end

it 'stubs out the OPTIONS request' do
visit '/preflight_request.html'
expect(page.find('#result')).to have_content 'Fail!'

proxy.stub(url, method: 'options').and_return(
headers: {
'Access-Control-Allow-Methods' => 'GET, OPTIONS',
Expand Down

0 comments on commit 09c3380

Please sign in to comment.