Skip to content

Commit

Permalink
change assert_nothing_raised to assert_difference
Browse files Browse the repository at this point in the history
this way we make sure the team was created, the background job did what
it was supposed to.
  • Loading branch information
vasconsaurus committed Sep 16, 2024
1 parent 324ad39 commit b510a7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/workers/generic_worker_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def teardown
test "should run a job, without raising an error, for a method that takes a hash as a parameter" do
Sidekiq::Testing.inline!

assert_nothing_raised do
assert_difference "Team.where(name: 'BackgroundTeam', slug: 'background-team').count" do
GenericWorker.perform_async('Team', 'create!', name: 'BackgroundTeam', slug: 'background-team')
end
end
Expand Down

0 comments on commit b510a7b

Please sign in to comment.