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:
authorShinya Maeda <shinya@gitlab.com>2017-08-22 11:01:11 +0300
committerShinya Maeda <shinya@gitlab.com>2017-09-03 17:49:10 +0300
commitbbe967abeba7be1db79e34439e74cd113c240b52 (patch)
treeb498f626149dc0e8ed541352fa9080e10a99fb34 /spec/models/ci
parenteda34b1a1846a5d5b55cc127a32b0c7628580f25 (diff)
Add the rest of specs
Diffstat (limited to 'spec/models/ci')
-rw-r--r--spec/models/ci/build_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb
index 0c35ad3c9d8..1673d873b57 100644
--- a/spec/models/ci/build_spec.rb
+++ b/spec/models/ci/build_spec.rb
@@ -43,6 +43,16 @@ describe Ci::Build do
it { is_expected.not_to include(manual_but_created) }
end
+ describe '.protected_' do
+ let!(:protected_job) { create(:ci_build, :protected) }
+ let!(:unprotected_job) { create(:ci_build, :unprotected) }
+
+ subject { described_class.protected_ }
+
+ it { is_expected.to include(protected_job) }
+ it { is_expected.not_to include(unprotected_job) }
+ end
+
describe '#actionize' do
context 'when build is a created' do
before do