Merge pull request #4616 from tgxworld/fix_safe_mode_redirect
FIX: Incorrect path for redirect.
This commit is contained in:
commit
5058911a7b
|
@ -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