Skip to content

Commit

Permalink
Fix assertion structure for rails 5
Browse files Browse the repository at this point in the history
Signed-off-by: GitHub <noreply@github.com>
  • Loading branch information
athal7 committed Mar 2, 2022
1 parent cc394c2 commit 1f2b980
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/queue_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ class QueueTest < ActiveSupport::TestCase
end

mock.expect(:call, 1, [category.id])
perform_enqueued_jobs { category.update!(name: "foo") }
assert_performed_with(job: Thermos::RebuildCacheJob, queue: "default")
assert_performed_with(job: Thermos::RebuildCacheJob, queue: "default") do
category.update!(name: "foo")
end
mock.verify
end

Expand All @@ -28,8 +29,9 @@ class QueueTest < ActiveSupport::TestCase
end

mock.expect(:call, 1, [category.id])
perform_enqueued_jobs { category.update!(name: "foo") }
assert_performed_with(job: Thermos::RebuildCacheJob, queue: "low_priority")
assert_performed_with(job: Thermos::RebuildCacheJob, queue: "low_priority") do
category.update!(name: "foo")
end
mock.verify
end
end

0 comments on commit 1f2b980

Please sign in to comment.