Skip to content

Commit bd43a5d

Browse files
committed
add test
1 parent b11872e commit bd43a5d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/transaction_test.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,13 @@ def pg_lock_count
6969
end
7070
assert_equal(0, pg_lock_count)
7171
end
72+
73+
specify 'transaction level locks fail if not in transaction' do
74+
Tag.with_advisory_lock 'test', transaction: true do
75+
raise 'should not get here'
76+
end
77+
78+
assert_match(/#{Regexp.escape('requires transaction')}/, exception.message)
79+
end
7280
end
7381
end

0 commit comments

Comments
 (0)