diff options
author | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-05-26 21:41:32 +0900 |
---|---|---|
committer | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-05-29 20:02:09 +0900 |
commit | ef61829b586ea2581d37d7c3ca0db60e01c8aec6 (patch) | |
tree | 5a6c6e6742f5c5a733423e34983a18f64ac8a5d2 /spec/models/ci | |
parent | 62ecce78ed054c770f890c93443ae1c53be85fab (diff) | |
download | gitlab-ce-ef61829b586ea2581d37d7c3ca0db60e01c8aec6.tar.gz |
Add a test for deletion of importing_or_inactive?
Diffstat (limited to 'spec/models/ci')
-rw-r--r-- | spec/models/ci/pipeline_schedule_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/ci/pipeline_schedule_spec.rb b/spec/models/ci/pipeline_schedule_spec.rb index 822b98c5f6c..b00e7a73571 100644 --- a/spec/models/ci/pipeline_schedule_spec.rb +++ b/spec/models/ci/pipeline_schedule_spec.rb @@ -25,6 +25,14 @@ describe Ci::PipelineSchedule, models: true do expect(pipeline_schedule).not_to be_valid end + + context 'when active is false' do + it 'does not allow nullified ref' do + pipeline_schedule = build(:ci_pipeline_schedule, :inactive, ref: nil) + + expect(pipeline_schedule).not_to be_valid + end + end end describe '#set_next_run_at' do |