Skip to content

Commit 6258d73

Browse files
committed
Coping with referential integrity checks in 2005. Seems to not cope well with the transactional fixtures.
1 parent 314f100 commit 6258d73

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/cases/adapter_test_sqlserver.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,13 +284,12 @@ def setup
284284
end
285285

286286
should 'NOT ALLOW by default the deletion of a referenced parent' do
287+
FkTestHasPk.connection.disable_referential_integrity { }
287288
assert_raise(ActiveRecord::StatementInvalid) { @parent.destroy }
288289
end
289290

290291
should 'ALLOW deletion of referenced parent using #disable_referential_integrity block' do
291-
assert_nothing_raised(ActiveRecord::StatementInvalid) do
292-
FkTestHasPk.connection.disable_referential_integrity { @parent.destroy }
293-
end
292+
FkTestHasPk.connection.disable_referential_integrity { @parent.destroy }
294293
end
295294

296295
should 'again NOT ALLOW deletion of referenced parent after #disable_referential_integrity block' do

0 commit comments

Comments
 (0)