diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-01-14 13:03:49 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-01-25 10:33:18 +0100 |
commit | 3a8b9aad69dd1b6a54b84a82f51fb81ffbdc5127 (patch) | |
tree | 538f415c63c2c29fdcc14ed3f18a3f6e83f005ec /spec/lib | |
parent | 5d85a04927a1bb435e18c637b845d0e11613d9e4 (diff) | |
download | gitlab-ce-3a8b9aad69dd1b6a54b84a82f51fb81ffbdc5127.tar.gz |
Refactor pipeline specs and remove raise_error warning
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/ci/pipeline/chain/populate_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/lib/gitlab/ci/pipeline/chain/populate_spec.rb b/spec/lib/gitlab/ci/pipeline/chain/populate_spec.rb index 3459939267a..0302e4090cf 100644 --- a/spec/lib/gitlab/ci/pipeline/chain/populate_spec.rb +++ b/spec/lib/gitlab/ci/pipeline/chain/populate_spec.rb @@ -163,14 +163,14 @@ describe Gitlab::Ci::Pipeline::Chain::Populate do ->(pipeline) { pipeline.variables.create!(key: 'VAR', value: '123') } end - it 'raises exception' do + it 'wastes pipeline iid' do expect { step.perform! }.to raise_error(ActiveRecord::RecordNotSaved) - end - it 'wastes pipeline iid' do - expect { step.perform! }.to raise_error + last_iid = InternalId.ci_pipelines + .where(project_id: project.id) + .last.last_value - expect(InternalId.ci_pipelines.where(project_id: project.id).last.last_value).to be > 0 + expect(last_iid).to be > 0 end end end |