Commit ff26347d authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch 'fix-false-positive-specs' into 'master'

Fix false positive specs

See merge request gitlab-org/gitlab-ce!26031
parents 0f04d4b2 03fa7834
......@@ -98,11 +98,7 @@ describe 'Private Group access' do
let(:project) { create(:project, :public) }
before do
Projects::GroupLinks::CreateService.new(
project,
create(:user),
link_group_access: ProjectGroupLink::DEVELOPER
).execute(group)
create(:project_group_link, project: project, group: group)
end
subject { group_path(group) }
......
......@@ -76,15 +76,10 @@ describe GroupPolicy do
context 'with no user and public project' do
let(:project) { create(:project, :public) }
let(:user) { create(:user) }
let(:current_user) { nil }
before do
Projects::GroupLinks::CreateService.new(
project,
user,
link_group_access: ProjectGroupLink::DEVELOPER
).execute(group)
create(:project_group_link, project: project, group: group)
end
it { expect_disallowed(:read_group) }
......@@ -96,11 +91,7 @@ describe GroupPolicy do
let(:current_user) { create(:user) }
before do
Projects::GroupLinks::CreateService.new(
project,
user,
link_group_access: ProjectGroupLink::DEVELOPER
).execute(group)
create(:project_group_link, project: project, group: group)
end
it { expect_disallowed(:read_group) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment