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 ...@@ -98,11 +98,7 @@ describe 'Private Group access' do
let(:project) { create(:project, :public) } let(:project) { create(:project, :public) }
before do before do
Projects::GroupLinks::CreateService.new( create(:project_group_link, project: project, group: group)
project,
create(:user),
link_group_access: ProjectGroupLink::DEVELOPER
).execute(group)
end end
subject { group_path(group) } subject { group_path(group) }
......
...@@ -76,15 +76,10 @@ describe GroupPolicy do ...@@ -76,15 +76,10 @@ describe GroupPolicy do
context 'with no user and public project' do context 'with no user and public project' do
let(:project) { create(:project, :public) } let(:project) { create(:project, :public) }
let(:user) { create(:user) }
let(:current_user) { nil } let(:current_user) { nil }
before do before do
Projects::GroupLinks::CreateService.new( create(:project_group_link, project: project, group: group)
project,
user,
link_group_access: ProjectGroupLink::DEVELOPER
).execute(group)
end end
it { expect_disallowed(:read_group) } it { expect_disallowed(:read_group) }
...@@ -96,11 +91,7 @@ describe GroupPolicy do ...@@ -96,11 +91,7 @@ describe GroupPolicy do
let(:current_user) { create(:user) } let(:current_user) { create(:user) }
before do before do
Projects::GroupLinks::CreateService.new( create(:project_group_link, project: project, group: group)
project,
user,
link_group_access: ProjectGroupLink::DEVELOPER
).execute(group)
end end
it { expect_disallowed(:read_group) } 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