Skip to content

Commit f5bba2c

Browse files
committed
Update adapter_test_sqlserver.rb
1 parent c91e9b4 commit f5bba2c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/cases/adapter_test_sqlserver.rb

+8-8
Original file line numberDiff line numberDiff line change
@@ -188,19 +188,19 @@ class AdapterTestSQLServer < ActiveRecord::TestCase
188188
it "destroys model with no associations" do
189189
connection.lowercase_schema_reflection = true
190190

191-
discount = Discount.create!
192-
assert_equal 1, Discount.count
193-
discount.destroy!
194-
assert_equal 0, Discount.count
191+
assert_nothing_raised do
192+
discount = Discount.create!
193+
discount.destroy!
194+
end
195195
end
196196

197197
it "destroys model with association" do
198198
connection.lowercase_schema_reflection = true
199199

200-
post = Post.create!(title: 'Setup', body: 'Record to be deleted')
201-
assert_equal 1, Post.count
202-
post.destroy!
203-
assert_equal 0, Post.count
200+
assert_nothing_raised do
201+
post = Post.create!(title: 'Setup', body: 'Record to be deleted')
202+
post.destroy!
203+
end
204204
end
205205
end
206206

0 commit comments

Comments
 (0)