Expect CORS preflight responses to not have a content type
authorTom Hughes <tom@compton.nu>
Thu, 28 Mar 2019 08:45:58 +0000 (08:45 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 28 Mar 2019 08:45:58 +0000 (08:45 +0000)
https://github.com/cyu/rack-cors/pull/180

test/integration/cors_test.rb

index 9ff7e36..82e8346 100644 (file)
@@ -9,7 +9,7 @@ class CORSTest < ActionDispatch::IntegrationTest
 
     assert_response :success
     assert_equal "*", response.headers["Access-Control-Allow-Origin"]
-    assert_equal "text/plain", response.content_type
+    assert_nil response.content_type
     assert_equal "", response.body
   end