summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2016-04-01 16:50:18 -0300
committerFelipe Artur <felipefac@gmail.com>2016-04-18 11:12:27 -0300
commit147879ae66fd742d13bbb5b72d492788bc48c8d9 (patch)
tree4800f696b0d1488209443e0ff5eb45046e43a2ce
parente8a77c0aee3eaf99793b3678a0eb97194244b339 (diff)
downloadgitlab-ce-147879ae66fd742d13bbb5b72d492788bc48c8d9.tar.gz
Fix specs
-rw-r--r--app/models/ability.rb4
-rw-r--r--spec/controllers/users_controller_spec.rb4
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