Skip to content

Commit 348fc1d

Browse files
authored
Fix passing a block to advisory_lock in tests (#1587)
This method does not take a block. As such, the expectation is never executed
1 parent b6cbd53 commit 348fc1d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

spec/app/models/concerns/good_job/advisory_lockable_spec.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,9 +483,8 @@
483483

484484
it "locks and unlocks" do
485485
GoodJob::Job.transaction do
486-
job.advisory_lock(function: "pg_advisory_xact_lock") do
487-
expect(job.advisory_locked?).to be true
488-
end
486+
job.advisory_lock(function: "pg_advisory_xact_lock")
487+
expect(job.advisory_locked?).to be true
489488
end
490489
expect(job.advisory_locked?).to be false
491490
end

0 commit comments

Comments
 (0)