summaryrefslogtreecommitdiff
path: root/spec/policies
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2017-08-01 14:51:52 -0400
committerRobert Speicher <rspeicher@gmail.com>2017-08-01 14:51:52 -0400
commit9513bd18c43b749c8856d6ad89635d97c8fb73b5 (patch)
treeb55d7fb920f0d6a8e10eabae1cafa5126fa03203 /spec/policies
parent4c77c30fbfb3734fd893f7cfe540fa595ea6539c (diff)
downloadgitlab-ce-9513bd18c43b749c8856d6ad89635d97c8fb73b5.tar.gz
Ensure all project factories use `:repository` trait or `:empty_project`rs-empty_project-cleanup
Diffstat (limited to 'spec/policies')
-rw-r--r--spec/policies/ci/build_policy_spec.rb2
-rw-r--r--spec/policies/ci/pipeline_policy_spec.rb2
-rw-r--r--spec/policies/environment_policy_spec.rb8
3 files changed, 6 insertions, 6 deletions
diff --git a/spec/policies/ci/build_policy_spec.rb b/spec/policies/ci/build_policy_spec.rb
index a83a83a7349..11a4c3c742e 100644
--- a/spec/policies/ci/build_policy_spec.rb
+++ b/spec/policies/ci/build_policy_spec.rb
@@ -97,7 +97,7 @@ describe Ci::BuildPolicy do
end
describe 'rules for protected ref' do
- let(:project) { create(:project) }
+ let(:project) { create(:project, :repository) }
let(:build) { create(:ci_build, ref: 'some-ref', pipeline: pipeline) }
before do
diff --git a/spec/policies/ci/pipeline_policy_spec.rb b/spec/policies/ci/pipeline_policy_spec.rb
index b11b06d301f..48a8064c5fc 100644
--- a/spec/policies/ci/pipeline_policy_spec.rb
+++ b/spec/policies/ci/pipeline_policy_spec.rb
@@ -10,7 +10,7 @@ describe Ci::PipelinePolicy, :models do
describe 'rules' do
describe 'rules for protected ref' do
- let(:project) { create(:project) }
+ let(:project) { create(:project, :repository) }
before do
project.add_developer(user)
diff --git a/spec/policies/environment_policy_spec.rb b/spec/policies/environment_policy_spec.rb
index 035e20c7452..de4cb5b30c5 100644
--- a/spec/policies/environment_policy_spec.rb
+++ b/spec/policies/environment_policy_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe EnvironmentPolicy do
let(:user) { create(:user) }
- let(:project) { create(:project) }
+ let(:project) { create(:project, :repository) }
let(:environment) do
create(:environment, :with_review_app, project: project)
@@ -14,7 +14,7 @@ describe EnvironmentPolicy do
describe '#rules' do
context 'when user does not have access to the project' do
- let(:project) { create(:project, :private) }
+ let(:project) { create(:project, :private, :repository) }
it 'does not include ability to stop environment' do
expect(policy).to be_disallowed :stop_environment
@@ -22,7 +22,7 @@ describe EnvironmentPolicy do
end
context 'when anonymous user has access to the project' do
- let(:project) { create(:project, :public) }
+ let(:project) { create(:project, :public, :repository) }
it 'does not include ability to stop environment' do
expect(policy).to be_disallowed :stop_environment
@@ -30,7 +30,7 @@ describe EnvironmentPolicy do
end
context 'when team member has access to the project' do
- let(:project) { create(:project, :public) }
+ let(:project) { create(:project, :public, :repository) }
before do
project.add_developer(user)