summaryrefslogtreecommitdiff
path: root/spec/policies
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-06-07 12:32:16 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2017-06-13 16:05:38 +0200
commit25b99a5b3beecb7251fef9097c44afd1f82f9f57 (patch)
tree8f005048ec11ae7ad27e5d999b263b458c7487a8 /spec/policies
parentd03e687882552cedaac2a493c9dbf4a3d98e0bac (diff)
downloadgitlab-ce-25b99a5b3beecb7251fef9097c44afd1f82f9f57.tar.gz
Update tests and applicationfix-external-ci-services
Diffstat (limited to 'spec/policies')
-rw-r--r--spec/policies/project_policy_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/policies/project_policy_spec.rb b/spec/policies/project_policy_spec.rb
index 0d3af1f4499..848fd547e10 100644
--- a/spec/policies/project_policy_spec.rb
+++ b/spec/policies/project_policy_spec.rb
@@ -139,6 +139,18 @@ describe ProjectPolicy, models: true do
is_expected.not_to include(:read_build, :read_pipeline)
end
end
+
+ context 'when builds are disabled' do
+ before do
+ project.project_feature.update(
+ builds_access_level: ProjectFeature::DISABLED)
+ end
+
+ it do
+ is_expected.not_to include(:read_build)
+ is_expected.to include(:read_pipeline)
+ end
+ end
end
context 'reporter' do