aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/relations_test.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2009-12-27 19:04:30 +0530
committerPratik Naik <pratiknaik@gmail.com>2009-12-27 19:04:30 +0530
commitd5e98dc859e24e9ebf8206a7955c6ac40819a117 (patch)
treeabe6272009f4f24b922e7a6884a16fbd60525b51 /activerecord/test/cases/relations_test.rb
parent8957f5db5d543b465af2ec55339628476ed17dc2 (diff)
downloadrails-d5e98dc859e24e9ebf8206a7955c6ac40819a117.tar.gz
rails-d5e98dc859e24e9ebf8206a7955c6ac40819a117.tar.bz2
rails-d5e98dc859e24e9ebf8206a7955c6ac40819a117.zip
Add relation.last and relation.reverse_order
Diffstat (limited to 'activerecord/test/cases/relations_test.rb')
-rw-r--r--activerecord/test/cases/relations_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb
index d65fb5095c..37bd755a5c 100644
--- a/activerecord/test/cases/relations_test.rb
+++ b/activerecord/test/cases/relations_test.rb
@@ -309,4 +309,10 @@ class RelationTest < ActiveRecord::TestCase
assert ! fake.exists?
assert ! fake.exists?(authors(:david).id)
end
+
+ def test_last
+ authors = Author.scoped
+ assert_equal authors(:mary), authors.last
+ end
+
end