FIX: Incorrect path for redirect.
This commit is contained in:
parent
c7289f423f
commit
18c8323987
|
@ -14,7 +14,7 @@ class SafeModeController < ApplicationController
|
|||
if safe_mode.length > 0
|
||||
redirect_to path("/?safe_mode=#{safe_mode.join("%2C")}")
|
||||
else
|
||||
redirect_to :index
|
||||
redirect_to safe_mode_path
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'Safe mode' do
|
||||
describe 'entering safe mode' do
|
||||
context 'when no params are given' do
|
||||
it 'should redirect back to safe mode page' do
|
||||
post '/safe-mode'
|
||||
|
||||
expect(response.status).to redirect_to(safe_mode_path)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue