Ensure cors headers are also returned for other requests

This commit is contained in:
Maciej Szlosarczyk 2018-10-17 11:22:52 +03:00
parent e3c83c601c
commit 09e0a96b70
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765
3 changed files with 18 additions and 0 deletions

View file

@ -24,4 +24,12 @@ class RegistrantApiCorsHeadersTest < ApplicationIntegrationTest
assert_equal('', response.body)
end
def test_it_returns_cors_headers_for_other_requests
post '/api/v1/registrant/auth/eid', {}
assert_equal('*', response.headers['Access-Control-Allow-Origin'])
get '/api/v1/registrant/contacts', {}
assert_equal('*', response.headers['Access-Control-Allow-Origin'])
end
end