diff options
author | Jeremy Watson <jwatson@gitlab.com> | 2018-10-05 20:10:20 +0300 |
---|---|---|
committer | Jeremy Watson <jwatson@gitlab.com> | 2018-10-05 20:10:20 +0300 |
commit | df833931b65499ea71937b7d20bddd85d5f27c54 (patch) | |
tree | 6f373c92cfe66c04bbb1ed345c57fa3836297316 /spec/workers/prune_old_events_worker_spec.rb | |
parent | d7f1b3dd697e2c560500098c684ab0e7ce3e003a (diff) |
Renamed test events
Diffstat (limited to 'spec/workers/prune_old_events_worker_spec.rb')
-rw-r--r-- | spec/workers/prune_old_events_worker_spec.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/workers/prune_old_events_worker_spec.rb b/spec/workers/prune_old_events_worker_spec.rb index fd5e4ca0ee4..d9fe08ceb50 100644 --- a/spec/workers/prune_old_events_worker_spec.rb +++ b/spec/workers/prune_old_events_worker_spec.rb @@ -5,8 +5,9 @@ describe PruneOldEventsWorker do let(:user) { create(:user) } 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_2_years_event) { create(:event, :closed, author: user, created_at: 2.years.ago) } + let!(:not_expired_1_day_event) { create(:event, :closed, author: user, created_at: 1.day.ago) } + let!(:not_expired_13_month_event) { create(:event, :closed, author: user, created_at: 13.months.ago) } + let!(:not_expired_2_years_event) { create(:event, :closed, author: user, created_at: 2.years.ago) } it 'prunes events older than 2 years' do expect { subject.perform }.to change { Event.count }.by(-1) |