aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/mixin_test.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-11-09 12:50:35 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-11-09 12:50:35 +0000
commitbc7ec23f4ef9ee5f8a8e7ec7b17af6652e4d438e (patch)
tree297555e2953ab305096c57c984c532f30af5ef7f /activerecord/test/mixin_test.rb
parente6f412def3ec9defcc1a97d1d9c4a8880b18d624 (diff)
downloadrails-bc7ec23f4ef9ee5f8a8e7ec7b17af6652e4d438e.tar.gz
rails-bc7ec23f4ef9ee5f8a8e7ec7b17af6652e4d438e.tar.bz2
rails-bc7ec23f4ef9ee5f8a8e7ec7b17af6652e4d438e.zip
Fixed acts_as_list for definitions without an explicit :order #2803 [jonathan@bluewire.net.nz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2951 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/mixin_test.rb')
-rw-r--r--activerecord/test/mixin_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/activerecord/test/mixin_test.rb b/activerecord/test/mixin_test.rb
index b551fb4402..82b2a143fd 100644
--- a/activerecord/test/mixin_test.rb
+++ b/activerecord/test/mixin_test.rb
@@ -291,6 +291,18 @@ class TreeTest < Test::Unit::TestCase
end
end
+class TreeTestWithoutOrder < Test::Unit::TestCase
+ fixtures :mixins
+
+ def test_root
+ assert [mixins(:tree_without_order_1), mixins(:tree_without_order_2)].include?(TreeMixinWithoutOrder.root)
+ end
+
+ def test_roots
+ assert_equal [], [mixins(:tree_without_order_1), mixins(:tree_without_order_2)] - TreeMixinWithoutOrder.roots
+ end
+end
+
class TouchTest < Test::Unit::TestCase
fixtures :mixins