Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-06-07 13:32:16 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2017-06-13 17:05:38 +0300
commit25b99a5b3beecb7251fef9097c44afd1f82f9f57 (patch)
tree8f005048ec11ae7ad27e5d999b263b458c7487a8 /spec/policies
parentd03e687882552cedaac2a493c9dbf4a3d98e0bac (diff)
Update tests and application
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