diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-07 00:11:11 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-07 00:11:11 +0000 |
commit | d4f8f25db649b973f1ae344cb0f8a407862d106b (patch) | |
tree | f71f2d2243dc768a1ec44e79556d8020bff51dc7 /spec/finders/releases_finder_spec.rb | |
parent | 5f0e3773e9695fd0c9e92ea9180c8a1f5cfaa5c5 (diff) | |
download | gitlab-ce-d4f8f25db649b973f1ae344cb0f8a407862d106b.tar.gz |
Add latest changes from gitlab-org/gitlab@master
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 |