test/test_service.rb in pinch_hitter-0.6.0 vs test/test_service.rb in pinch_hitter-0.7.0
- old
+ new
@@ -35,11 +35,11 @@
def test_reset
post "/reset", ''
assert_equal 200, last_response.status
post "/respond", ''
- assert_equal 200, last_response.status
+ assert_equal 404, last_response.status
assert_equal '', last_response.body
end
def test_store_with_params
post '/store?endpoint=test2/subtest', yml_message
@@ -144,9 +144,16 @@
post "/store", xml_message
post "/respond", ''
assert_equal 'no-cache, no-store', last_response['Cache-Control']
app.disable :no_cache
+ end
+
+ def test_cors_protections_are_off
+ post "/store", xml_message
+ post "/respond", ''
+
+ assert_nil last_response["X-Frame-Options"]
end
def test_request_handler
post '/register_module?endpoint=stuff', Marshal.dump(TestRequestHandler)
post '/stuff', ''