diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2017-11-21 18:15:51 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2017-11-21 18:15:51 +0000 |
commit | ce019812a5127d503c735f5fe870e2aa4ad14665 (patch) | |
tree | 583e5e79eafe7bb9dcc6cdccce12ba598b448b84 /spec | |
parent | 6da130c2952494c8c773a65d795ad2261d291e53 (diff) | |
parent | 54f1e406f40a31c6d790bdeabc55556a268990e1 (diff) | |
download | gitlab-ce-ce019812a5127d503c735f5fe870e2aa4ad14665.tar.gz |
Merge branch 'reduce-queries-for-artifacts-button' into 'master'
Use arrays in Ci::Pipeline#latest_builds_with_artifacts
See merge request gitlab-org/gitlab-ce!15525
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/ci/pipeline_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index b89b0e555d9..3a19a0753e2 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -1502,6 +1502,10 @@ describe Ci::Pipeline, :mailer do create(:ci_build, :success, :artifacts, pipeline: pipeline) end + it 'returns an Array' do + expect(pipeline.latest_builds_with_artifacts).to be_an_instance_of(Array) + end + it 'returns the latest builds' do expect(pipeline.latest_builds_with_artifacts).to eq([build]) end |