From 147879ae66fd742d13bbb5b72d492788bc48c8d9 Mon Sep 17 00:00:00 2001 From: Felipe Artur Date: Fri, 1 Apr 2016 16:50:18 -0300 Subject: [PATCH] Fix specs --- app/models/ability.rb | 4 ++-- spec/controllers/users_controller_spec.rb | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/models/ability.rb b/app/models/ability.rb index 874ec360944..684834aa394 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -156,6 +156,7 @@ class Ability rules -= project_archived_rules end + rules << :read_project_members rules - project_disabled_features_rules(project) end end @@ -177,8 +178,7 @@ class Ability @public_project_rules ||= project_guest_rules + [ :download_code, :fork_project, - :read_commit_status, - :read_project_members + :read_commit_status ] end diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb index 26acfd3bd96..7701da9747a 100644 --- a/spec/controllers/users_controller_spec.rb +++ b/spec/controllers/users_controller_spec.rb @@ -30,10 +30,12 @@ describe UsersController do end describe 'when logged out' do + before { stub_application_setting(restricted_visibility_levels: []) } + it 'renders the show template' do get :show, username: user.username - expect(response).to be_success + expect(response.status).to eq(200) expect(response).to render_template('show') end end