diff options
Diffstat (limited to 'spec/models/ci/sources/pipeline_spec.rb')
-rw-r--r-- | spec/models/ci/sources/pipeline_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/models/ci/sources/pipeline_spec.rb b/spec/models/ci/sources/pipeline_spec.rb new file mode 100644 index 00000000000..63bee5bfb55 --- /dev/null +++ b/spec/models/ci/sources/pipeline_spec.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe Ci::Sources::Pipeline do + it { is_expected.to belong_to(:project) } + it { is_expected.to belong_to(:pipeline) } + + it { is_expected.to belong_to(:source_project) } + it { is_expected.to belong_to(:source_job) } + it { is_expected.to belong_to(:source_pipeline) } + + it { is_expected.to validate_presence_of(:project) } + it { is_expected.to validate_presence_of(:pipeline) } + + it { is_expected.to validate_presence_of(:source_project) } + it { is_expected.to validate_presence_of(:source_job) } + it { is_expected.to validate_presence_of(:source_pipeline) } +end |