summaryrefslogtreecommitdiff
path: root/test/controllers/csp_reports_controller_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/controllers/csp_reports_controller_test.rb')
-rw-r--r--test/controllers/csp_reports_controller_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/controllers/csp_reports_controller_test.rb b/test/controllers/csp_reports_controller_test.rb
new file mode 100644
index 0000000..7dd8c9e
--- /dev/null
+++ b/test/controllers/csp_reports_controller_test.rb
@@ -0,0 +1,8 @@
1require 'test_helper'
2
3class CspReportsControllerTest < ActionController::TestCase
4 test "accepts anonymous reports without CSRF" do
5 post :create, body: '{"csp-report":{"violated-directive":"script-src"}}'
6 assert_response :no_content
7 end
8end