Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
donbobka committed Apr 21, 2023
1 parent b11872e commit bd43a5d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/transaction_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,13 @@ def pg_lock_count
end
assert_equal(0, pg_lock_count)
end

specify 'transaction level locks fail if not in transaction' do
Tag.with_advisory_lock 'test', transaction: true do
raise 'should not get here'
end

assert_match(/#{Regexp.escape('requires transaction')}/, exception.message)
end
end
end

0 comments on commit bd43a5d

Please sign in to comment.