aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-12-13 11:39:31 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2010-12-13 11:39:31 -0800
commit6ed6e4f9df7c08cbf053501346beb4b0fb42b348 (patch)
tree935f98c3288a92ca33a6709c2728534db85c67c7 /activerecord
parent658bb4fa25db0b3f61bfb64028274f2365cad506 (diff)
downloadrails-6ed6e4f9df7c08cbf053501346beb4b0fb42b348.tar.gz
rails-6ed6e4f9df7c08cbf053501346beb4b0fb42b348.tar.bz2
rails-6ed6e4f9df7c08cbf053501346beb4b0fb42b348.zip
persisted? should be able to return a truthy object
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/transactions_test.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/activerecord/test/cases/transactions_test.rb b/activerecord/test/cases/transactions_test.rb
index b0ccd71836..110a18772f 100644
--- a/activerecord/test/cases/transactions_test.rb
+++ b/activerecord/test/cases/transactions_test.rb
@@ -370,23 +370,23 @@ class TransactionTest < ActiveRecord::TestCase
assert topic_2.save
@first.save
@second.destroy
- assert_equal true, topic_1.persisted?
+ assert topic_1.persisted?, 'persisted'
assert_not_nil topic_1.id
- assert_equal true, topic_2.persisted?
+ assert topic_2.persisted?, 'persisted'
assert_not_nil topic_2.id
- assert_equal true, @first.persisted?
+ assert @first.persisted?, 'persisted'
assert_not_nil @first.id
- assert_equal true, @second.destroyed?
+ assert @second.destroyed?, 'destroyed'
raise ActiveRecord::Rollback
end
- assert_equal false, topic_1.persisted?
+ assert !topic_1.persisted?, 'not persisted'
assert_nil topic_1.id
- assert_equal false, topic_2.persisted?
+ assert !topic_2.persisted?, 'not persisted'
assert_nil topic_2.id
- assert_equal true, @first.persisted?
+ assert @first.persisted?, 'persisted'
assert_not_nil @first.id
- assert_equal false, @second.destroyed?
+ assert !@second.destroyed?, 'not destroyed'
end
if current_adapter?(:PostgreSQLAdapter) && defined?(PGconn::PQTRANS_IDLE)