0
0
Fork 0

When web UI URL used while logged out, redirect to static page (#4954)

This commit is contained in:
Eugen Rochko 2017-09-15 00:57:08 +02:00 committed by GitHub
parent 0d1215e82f
commit 472df24579
2 changed files with 36 additions and 1 deletions

View file

@ -6,6 +6,7 @@ RSpec.describe HomeController, type: :controller do
describe 'GET #index' do
context 'when not signed in' do
it 'redirects to about page' do
@request.path = '/'
get :index
expect(response).to redirect_to(about_path)
end
@ -13,6 +14,7 @@ RSpec.describe HomeController, type: :controller do
context 'when signed in' do
let(:user) { Fabricate(:user) }
subject do
sign_in(user)
get :index