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-31 15:13:40 +0300
committerShinya Maeda <shinya@gitlab.com>2017-09-03 17:49:11 +0300
commitce7c0ac3dbdc3f2f2f34b39bf5ef3755e79e9d42 (patch)
tree2f86ef281b73d2c1ba9f372f759a3bbfd6c9882c /spec/models/ci
parentf3d3cecf5a7691c5df48fc6b0f3d206cd57203db (diff)
Add validation for protected attributes
Diffstat (limited to 'spec/models/ci')
-rw-r--r--spec/models/ci/build_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb
index a94fdbf8434..cab59db3580 100644
--- a/spec/models/ci/build_spec.rb
+++ b/spec/models/ci/build_spec.rb
@@ -59,7 +59,11 @@ describe Ci::Build do
end
context 'when protected is false' do
- let!(:job) { create(:ci_build, protected: nil) }
+ let!(:job) { create(:ci_build) }
+
+ before do
+ job.update_attribute(:protected, nil)
+ end
it { is_expected.not_to include(job) }
end