mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 19:30:23 -06:00
89ad2b5900
This updates tests to use latest rails 5 practice and updates ALL dependencies that could be updated Performance testing shows that performance has not regressed if anything it is marginally faster now.
30 lines
720 B
Ruby
30 lines
720 B
Ruby
require 'rails_helper'
|
|
|
|
describe AboutController do
|
|
|
|
context '.index' do
|
|
|
|
it "should display the about page for anonymous user when login_required is false" do
|
|
SiteSetting.login_required = false
|
|
get "/about"
|
|
|
|
expect(response).to be_successful
|
|
end
|
|
|
|
it 'should redirect to login page for anonymous user when login_required is true' do
|
|
SiteSetting.login_required = true
|
|
get "/about"
|
|
|
|
expect(response).to redirect_to '/login'
|
|
end
|
|
|
|
it "should display the about page for logged in user when login_required is true" do
|
|
SiteSetting.login_required = true
|
|
sign_in(Fabricate(:user))
|
|
get "/about"
|
|
|
|
expect(response).to be_successful
|
|
end
|
|
end
|
|
end
|