提交 d707e2a4 编写于 作者: S 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.
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册