summaryrefslogtreecommitdiff
path: root/spec/models/ci
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-05-19 04:01:16 -0700
committerStan Hu <stanhu@gmail.com>2019-05-21 23:19:07 -0700
commitd707e2a49f2efe4670b5ebe62fb61554640ca7e9 (patch)
tree2e4c31abb2b890eb803bdef4d2b5fba022a5c98a /spec/models/ci
parent52d24e66cec1fa6c0100adb64effd2073869cd8b (diff)
downloadgitlab-ce-d707e2a49f2efe4670b5ebe62fb61554640ca7e9.tar.gz
Ensure subject passes validations
Rails 5 requires that belongs_to associations have the associated record present. These tests were failing because they had nil values.
Diffstat (limited to 'spec/models/ci')
-rw-r--r--spec/models/ci/pipeline_schedule_spec.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/models/ci/pipeline_schedule_spec.rb b/spec/models/ci/pipeline_schedule_spec.rb
index 1bfc14d2839..42d4769a921 100644
--- a/spec/models/ci/pipeline_schedule_spec.rb
+++ b/spec/models/ci/pipeline_schedule_spec.rb
@@ -3,6 +3,8 @@
require 'spec_helper'
describe Ci::PipelineSchedule do
+ subject { build(:ci_pipeline_schedule) }
+
it { is_expected.to belong_to(:project) }
it { is_expected.to belong_to(:owner) }