Skip to content
Snippets Groups Projects
Commit d707e2a4 authored by Stan Hu's avatar Stan Hu
Browse files

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
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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) }
 
Loading
Loading
Loading
Loading
@@ -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) }
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment