diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-04-30 22:25:56 +0900 |
---|---|---|
committer | Kamil TrzciĆski <ayufan@ayufan.eu> | 2018-05-03 10:49:13 +0200 |
commit | 35cf604b72ec6cabffc46cc7c2da76fb303525cb (patch) | |
tree | 970cf85136525349d1c71fa5039026eecb4a3b69 | |
parent | 787eddd55d3699c73a69c99eb66e6a4b3b63b330 (diff) | |
download | gitlab-ce-35cf604b72ec6cabffc46cc7c2da76fb303525cb.tar.gz |
Add to_param override to lookup :id path
-rw-r--r-- | spec/models/ci/pipeline_spec.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index dd94515b0a4..51cdf185c9f 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -35,6 +35,15 @@ describe Ci::Pipeline, :mailer do end end + describe 'modules' do + it_behaves_like 'AtomicInternalId' do + let(:internal_id_attribute) { :iid } + let(:instance) { build(:ci_pipeline) } + let(:scope_attrs) { { project: instance.project } } + let(:usage) { :ci_pipelines } + end + end + describe '#source' do context 'when creating new pipeline' do let(:pipeline) do @@ -173,7 +182,7 @@ describe Ci::Pipeline, :mailer do it 'includes all predefined variables in a valid order' do keys = subject.map { |variable| variable[:key] } - expect(keys).to eq %w[CI_PIPELINE_ID CI_CONFIG_PATH CI_PIPELINE_SOURCE] + expect(keys).to eq %w[CI_PIPELINE_ID CI_PIPELINE_IID CI_CONFIG_PATH CI_PIPELINE_SOURCE] end end |