diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-10-11 14:51:39 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-10-11 14:51:39 +0200 |
commit | 1486950bc9396f9b8384763d68f36387326eb745 (patch) | |
tree | 83107afb894737957ae40f78bbbd50aa5a94c300 /spec | |
parent | eedf43d69bb2d3e5ed73b751565beb5d1badd8c7 (diff) | |
download | gitlab-ce-1486950bc9396f9b8384763d68f36387326eb745.tar.gz |
Extend pipeline build chain specsbackstage/gb/build-pipeline-in-a-separate-class
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/ci/pipeline/chain/build_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/gitlab/ci/pipeline/chain/build_spec.rb b/spec/lib/gitlab/ci/pipeline/chain/build_spec.rb index 82f70dd176d..0f1d72080c5 100644 --- a/spec/lib/gitlab/ci/pipeline/chain/build_spec.rb +++ b/spec/lib/gitlab/ci/pipeline/chain/build_spec.rb @@ -31,6 +31,10 @@ describe Gitlab::Ci::Pipeline::Chain::Build do it 'fills pipeline object with data' do expect(pipeline.sha).not_to be_empty + expect(pipeline.sha).to eq project.commit.id + expect(pipeline.ref).to eq 'master' + expect(pipeline.user).to eq user + expect(pipeline.project).to eq project end it 'sets a valid config source' do @@ -40,4 +44,8 @@ describe Gitlab::Ci::Pipeline::Chain::Build do it 'returns a valid pipeline' do expect(pipeline).to be_valid end + + it 'does not persist a pipeline' do + expect(pipeline).not_to be_persisted + end end |