aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-12-13 11:39:31 -0800
committerVijay Dev <vijaydev.cse@gmail.com>2010-12-16 01:49:28 +0530
commita1ca1e85a9ccefd72db4dc700a894c5bd7db53de (patch)
tree79a7f93dbe0e21514eabaab8e4a6d5df56859b38 /activerecord/test/cases
parentbda16eb0920780509467bcf051d1a01639357903 (diff)
downloadrails-a1ca1e85a9ccefd72db4dc700a894c5bd7db53de.tar.gz
rails-a1ca1e85a9ccefd72db4dc700a894c5bd7db53de.tar.bz2
rails-a1ca1e85a9ccefd72db4dc700a894c5bd7db53de.zip
persisted? should be able to return a truthy object
Diffstat (limited to 'activerecord/test/cases')
-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)