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:
parent
3d78df3738
commit
d6406b3e3b
3 changed files with 4 additions and 0 deletions
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
ENV['RACK_ENV'] ||= 'test'
|
||||
|
||||
if RUBY_PLATFORM != "java"
|
||||
require 'coveralls'
|
||||
Coveralls.wear!
|
||||
|
|
Loading…
Reference in a new issue