diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 17:34:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 17:34:42 +0300 |
commit | 9f46488805e86b1bc341ea1620b866016c2ce5ed (patch) | |
tree | f9748c7e287041e37d6da49e0a29c9511dc34768 /spec/finders/releases_finder_spec.rb | |
parent | dfc92d081ea0332d69c8aca2f0e745cb48ae5e6d (diff) |
Add latest changes from gitlab-org/gitlab@13-0-stable-ee
Diffstat (limited to 'spec/finders/releases_finder_spec.rb')
-rw-r--r-- | spec/finders/releases_finder_spec.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/finders/releases_finder_spec.rb b/spec/finders/releases_finder_spec.rb index 3da5ee47b6b..cb4e5fed816 100644 --- a/spec/finders/releases_finder_spec.rb +++ b/spec/finders/releases_finder_spec.rb @@ -5,10 +5,11 @@ require 'spec_helper' describe ReleasesFinder do let(:user) { create(:user) } let(:project) { create(:project, :repository) } + let(:params) { {} } let(:repository) { project.repository } let(:v1_0_0) { create(:release, project: project, tag: 'v1.0.0') } let(:v1_1_0) { create(:release, project: project, tag: 'v1.1.0') } - let(:finder) { described_class.new(project, user) } + let(:finder) { described_class.new(project, user, params) } before do v1_0_0.update_attribute(:released_at, 2.days.ago) @@ -64,6 +65,14 @@ describe ReleasesFinder do expect(subject).to eq([v1_1_0]) end end + + context 'when a tag parameter is passed' do + let(:params) { { tag: 'v1.0.0' } } + + it 'only returns the release with the matching tag' do + expect(subject).to eq([v1_0_0]) + end + end end end end |