diff options
author | Alessio Caiazza <acaiazza@gitlab.com> | 2018-12-21 15:51:46 +0100 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-12-31 12:05:56 +0900 |
commit | a7aaad96f3cca5be2886bf3e18c81a7b06e5129f (patch) | |
tree | 5d9c5e548ce4a450606420e832d9e7dacdb3905e /spec/finders | |
parent | b9aac409a5dfcdd1410c37ffb6eb30264d0b2784 (diff) | |
download | gitlab-ce-a7aaad96f3cca5be2886bf3e18c81a7b06e5129f.tar.gz |
ReleasesFinder will always return a relation
Diffstat (limited to 'spec/finders')
-rw-r--r-- | spec/finders/releases_finder_spec.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/finders/releases_finder_spec.rb b/spec/finders/releases_finder_spec.rb index aa7163021cb..32ee15134a2 100644 --- a/spec/finders/releases_finder_spec.rb +++ b/spec/finders/releases_finder_spec.rb @@ -6,15 +6,14 @@ describe ReleasesFinder do let(:user) { create(:user) } let(:project) { create(:project, :repository) } 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(:v1_0_0) { create(:release, project: project, tag: 'v1.0.0') } + let(:v1_1_0) { create(:release, project: project, tag: 'v1.1.0') } subject { described_class.new(project, user)} before do - now = Time.now - v1_0_0.update_attribute(:created_at, now - 2.days) - v1_1_0.update_attribute(:created_at, now - 1.day) + v1_0_0.update_attribute(:created_at, 2.days.ago) + v1_1_0.update_attribute(:created_at, 1.day.ago) end describe '#execute' do |