Commit d707e2a4 authored by Stan Hu's avatar Stan Hu

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.
parent 52d24e66
......@@ -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) }
......
......@@ -5,6 +5,8 @@ require 'spec_helper'
describe Clusters::Cluster do
it_behaves_like 'having unique enum values'
subject { build(:cluster) }
it { is_expected.to belong_to(:user) }
it { is_expected.to have_many(:cluster_projects) }
it { is_expected.to have_many(:projects) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment