diff options
Diffstat (limited to 'spec/workers/scheduler/media_cleanup_scheduler_spec.rb')
-rw-r--r-- | spec/workers/scheduler/media_cleanup_scheduler_spec.rb | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/spec/workers/scheduler/media_cleanup_scheduler_spec.rb b/spec/workers/scheduler/media_cleanup_scheduler_spec.rb deleted file mode 100644 index 8a0da67e1..000000000 --- a/spec/workers/scheduler/media_cleanup_scheduler_spec.rb +++ /dev/null @@ -1,15 +0,0 @@ -require 'rails_helper' - -describe Scheduler::MediaCleanupScheduler do - subject { described_class.new } - - let!(:old_media) { Fabricate(:media_attachment, account_id: nil, created_at: 10.days.ago) } - let!(:new_media) { Fabricate(:media_attachment, account_id: nil, created_at: 1.hour.ago) } - - it 'removes old media records' do - subject.perform - - expect { old_media.reload }.to raise_error(ActiveRecord::RecordNotFound) - expect(new_media.reload).to be_persisted - end -end |