uploads: switch to active job.
* Switch upload processing from DelayedJob to ActiveJob. * Remove remaining references to delayed job from tests. Closes #4128.
This commit is contained in:
@@ -36,17 +36,12 @@ class PostTest < ActiveSupport::TestCase
|
||||
context "Deletion:" do
|
||||
context "Expunging a post" do
|
||||
setup do
|
||||
Delayed::Worker.delay_jobs = true
|
||||
@upload = UploadService.new(FactoryBot.attributes_for(:jpg_upload)).start!
|
||||
@post = @upload.post
|
||||
Favorite.add(post: @post, user: @user)
|
||||
create(:favorite_group).add!(@post.id)
|
||||
end
|
||||
|
||||
teardown do
|
||||
Delayed::Worker.delay_jobs = false
|
||||
end
|
||||
|
||||
should "delete the files" do
|
||||
assert_nothing_raised { @post.file(:preview) }
|
||||
assert_nothing_raised { @post.file(:original) }
|
||||
|
||||
Reference in New Issue
Block a user