Commit df833931 authored by Jeremy Watson's avatar Jeremy Watson

Renamed test events

parent d7f1b3dd
...@@ -5,8 +5,9 @@ describe PruneOldEventsWorker do ...@@ -5,8 +5,9 @@ describe PruneOldEventsWorker do
let(:user) { create(:user) } let(:user) { create(:user) }
let!(:expired_event) { create(:event, :closed, author: user, created_at: 25.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!(:not_expired_1_day_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_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 it 'prunes events older than 2 years' do
expect { subject.perform }.to change { Event.count }.by(-1) expect { subject.perform }.to change { Event.count }.by(-1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment