1
0
Fork 0
mirror of https://github.com/endofunky/sidetiq.git synced 2022-11-09 13:53:30 -05:00

Send CSRF tokens with trigger and unlock actions, set RACK_ENV to "test" during tests to disable Rack::Protection

This commit is contained in:
Mike Dalton 2015-10-01 10:08:15 -04:00
parent 3d78df3738
commit d6406b3e3b
3 changed files with 4 additions and 0 deletions

View file

@ -36,6 +36,7 @@
</td>
<td>
<form action="<%= "#{root_path}sidetiq/#{meta.key}/unlock" %>" method="post">
<%= csrf_tag %>
<input class="btn btn-danger btn-small" type="submit" name="trigger" value="Unlock" data-confirm="Are you sure you want remove this lock?" />
</form>
</td>

View file

@ -37,6 +37,7 @@
</td>
<td>
<form action="<%= "#{root_path}sidetiq/#{worker.name}/trigger" %>" method="post">
<%= csrf_tag %>
<input class="btn btn-danger btn-small" type="submit" name="trigger" value="Trigger" data-confirm="Are you sure you want to trigger this job?" />
</form>
</td>

View file

@ -1,3 +1,5 @@
ENV['RACK_ENV'] ||= 'test'
if RUBY_PLATFORM != "java"
require 'coveralls'
Coveralls.wear!