diff options
author | Jeremy Watson <jwatson@gitlab.com> | 2018-10-05 20:07:00 +0300 |
---|---|---|
committer | Jeremy Watson <jwatson@gitlab.com> | 2018-10-05 20:07:00 +0300 |
commit | d7f1b3dd697e2c560500098c684ab0e7ce3e003a (patch) | |
tree | ba3680ad8c731af08c3480e866ffdc9f3ad9adaf /spec/workers/prune_old_events_worker_spec.rb | |
parent | 8f6a1f143de2395467086f15727f54ee773f2d73 (diff) |
Updated existing spec for new 2 year timeframe
Diffstat (limited to 'spec/workers/prune_old_events_worker_spec.rb')
-rw-r--r-- | spec/workers/prune_old_events_worker_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/workers/prune_old_events_worker_spec.rb b/spec/workers/prune_old_events_worker_spec.rb index ea974355050..fd5e4ca0ee4 100644 --- a/spec/workers/prune_old_events_worker_spec.rb +++ b/spec/workers/prune_old_events_worker_spec.rb @@ -4,11 +4,11 @@ describe PruneOldEventsWorker do describe '#perform' do let(:user) { create(:user) } - let!(:expired_event) { create(:event, :closed, author: user, created_at: 13.months.ago) } + let!(:expired_event) { create(:event, :closed, author: user, created_at: 25.months.ago) } let!(:not_expired_event) { create(:event, :closed, author: user, created_at: 1.day.ago) } - let!(:exactly_12_months_event) { create(:event, :closed, author: user, created_at: 12.months.ago) } + let!(:exactly_2_years_event) { create(:event, :closed, author: user, created_at: 2.years.ago) } - it 'prunes events older than 12 months' do + it 'prunes events older than 2 years' do expect { subject.perform }.to change { Event.count }.by(-1) expect(Event.find_by(id: expired_event.id)).to be_nil end |