diff options
Diffstat (limited to 'spec/features/security')
6 files changed, 9 insertions, 6 deletions
diff --git a/spec/features/security/group/internal_access_spec.rb b/spec/features/security/group/internal_access_spec.rb index 53573043ac7..bf7be33013e 100644 --- a/spec/features/security/group/internal_access_spec.rb +++ b/spec/features/security/group/internal_access_spec.rb @@ -4,7 +4,7 @@ describe 'Internal Group access' do include AccessMatchers let(:group) { create(:group, :internal) } - let(:project) { create(:project, :internal, group: group) } + let(:project) { create(:empty_project, :internal, group: group) } let(:project_guest) do create(:user) do |user| project.add_guest(user) @@ -49,6 +49,7 @@ describe 'Internal Group access' do end describe 'GET /groups/:path/merge_requests' do + let(:project) { create(:project, :internal, :repository, group: group) } subject { merge_requests_group_path(group) } it { is_expected.to be_allowed_for(:admin) } diff --git a/spec/features/security/group/private_access_spec.rb b/spec/features/security/group/private_access_spec.rb index 76c4e2c7197..c399d7a0851 100644 --- a/spec/features/security/group/private_access_spec.rb +++ b/spec/features/security/group/private_access_spec.rb @@ -4,7 +4,7 @@ describe 'Private Group access' do include AccessMatchers let(:group) { create(:group, :private) } - let(:project) { create(:project, :private, group: group) } + let(:project) { create(:empty_project, :private, group: group) } let(:project_guest) do create(:user) do |user| project.add_guest(user) @@ -49,6 +49,7 @@ describe 'Private Group access' do end describe 'GET /groups/:path/merge_requests' do + let(:project) { create(:project, :private, :repository, group: group) } subject { merge_requests_group_path(group) } it { is_expected.to be_allowed_for(:admin) } diff --git a/spec/features/security/group/public_access_spec.rb b/spec/features/security/group/public_access_spec.rb index 52e87d8d055..63e4d7ca65c 100644 --- a/spec/features/security/group/public_access_spec.rb +++ b/spec/features/security/group/public_access_spec.rb @@ -4,7 +4,7 @@ describe 'Public Group access' do include AccessMatchers let(:group) { create(:group, :public) } - let(:project) { create(:project, :public, group: group) } + let(:project) { create(:empty_project, :public, group: group) } let(:project_guest) do create(:user) do |user| project.add_guest(user) @@ -49,6 +49,7 @@ describe 'Public Group access' do end describe 'GET /groups/:path/merge_requests' do + let(:project) { create(:project, :public, :repository, group: group) } subject { merge_requests_group_path(group) } it { is_expected.to be_allowed_for(:admin) } diff --git a/spec/features/security/project/internal_access_spec.rb b/spec/features/security/project/internal_access_spec.rb index 290cebf511a..a7928857b7d 100644 --- a/spec/features/security/project/internal_access_spec.rb +++ b/spec/features/security/project/internal_access_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe "Internal Project Access" do include AccessMatchers - set(:project) { create(:project, :internal) } + set(:project) { create(:project, :internal, :repository) } describe "Project should be internal" do describe '#internal?' do diff --git a/spec/features/security/project/private_access_spec.rb b/spec/features/security/project/private_access_spec.rb index 276d817b59c..a4396b20afd 100644 --- a/spec/features/security/project/private_access_spec.rb +++ b/spec/features/security/project/private_access_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe "Private Project Access" do include AccessMatchers - set(:project) { create(:project, :private, public_builds: false) } + set(:project) { create(:project, :private, :repository, public_builds: false) } describe "Project should be private" do describe '#private?' do diff --git a/spec/features/security/project/public_access_spec.rb b/spec/features/security/project/public_access_spec.rb index 417b0894a5c..fccdeb0e5b7 100644 --- a/spec/features/security/project/public_access_spec.rb +++ b/spec/features/security/project/public_access_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe "Public Project Access" do include AccessMatchers - set(:project) { create(:project, :public) } + set(:project) { create(:project, :public, :repository) } describe "Project should be public" do describe '#public?' do |