Skip to content

Commit

Permalink
Update adapter_test_sqlserver.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanharan committed Mar 1, 2025
1 parent c91e9b4 commit f5bba2c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/cases/adapter_test_sqlserver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -188,19 +188,19 @@ class AdapterTestSQLServer < ActiveRecord::TestCase
it "destroys model with no associations" do
connection.lowercase_schema_reflection = true

discount = Discount.create!
assert_equal 1, Discount.count
discount.destroy!
assert_equal 0, Discount.count
assert_nothing_raised do
discount = Discount.create!
discount.destroy!
end
end

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

post = Post.create!(title: 'Setup', body: 'Record to be deleted')
assert_equal 1, Post.count
post.destroy!
assert_equal 0, Post.count
assert_nothing_raised do
post = Post.create!(title: 'Setup', body: 'Record to be deleted')
post.destroy!
end
end
end

Expand Down

0 comments on commit f5bba2c

Please sign in to comment.