From d6406b3e3bc3d77f82afef63d876b74b1c16d41f Mon Sep 17 00:00:00 2001 From: Mike Dalton Date: Thu, 1 Oct 2015 10:08:15 -0400 Subject: [PATCH] Send CSRF tokens with trigger and unlock actions, set RACK_ENV to "test" during tests to disable Rack::Protection --- lib/sidetiq/views/locks.erb | 1 + lib/sidetiq/views/sidetiq.erb | 1 + test/helper.rb | 2 ++ 3 files changed, 4 insertions(+) diff --git a/lib/sidetiq/views/locks.erb b/lib/sidetiq/views/locks.erb index de15b8f..78d5765 100644 --- a/lib/sidetiq/views/locks.erb +++ b/lib/sidetiq/views/locks.erb @@ -36,6 +36,7 @@
" method="post"> + <%= csrf_tag %>
diff --git a/lib/sidetiq/views/sidetiq.erb b/lib/sidetiq/views/sidetiq.erb index 10b8cde..49e21dd 100644 --- a/lib/sidetiq/views/sidetiq.erb +++ b/lib/sidetiq/views/sidetiq.erb @@ -37,6 +37,7 @@
" method="post"> + <%= csrf_tag %>
diff --git a/test/helper.rb b/test/helper.rb index 3e6c7c4..1990a32 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -1,3 +1,5 @@ +ENV['RACK_ENV'] ||= 'test' + if RUBY_PLATFORM != "java" require 'coveralls' Coveralls.wear!