aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/mixin_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/mixin_test.rb')
-rw-r--r--activerecord/test/mixin_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/test/mixin_test.rb b/activerecord/test/mixin_test.rb
index 4fcc6b6fba..b551fb4402 100644
--- a/activerecord/test/mixin_test.rb
+++ b/activerecord/test/mixin_test.rb
@@ -280,6 +280,15 @@ class TreeTest < Test::Unit::TestCase
assert_equal [mixins(:tree_1), mixins(:tree3_1)], mixins(:tree2_1).siblings
assert_equal [mixins(:tree_1), mixins(:tree2_1)], mixins(:tree3_1).siblings
end
+
+ def test_self_and_siblings
+ assert_equal [mixins(:tree_1), mixins(:tree2_1), mixins(:tree3_1)], mixins(:tree_1).self_and_siblings
+ assert_equal [mixins(:tree_2), mixins(:tree_4)], mixins(:tree_2).self_and_siblings
+ assert_equal [mixins(:tree_3)], mixins(:tree_3).self_and_siblings
+ assert_equal [mixins(:tree_2), mixins(:tree_4)], mixins(:tree_4).self_and_siblings
+ assert_equal [mixins(:tree_1), mixins(:tree2_1), mixins(:tree3_1)], mixins(:tree2_1).self_and_siblings
+ assert_equal [mixins(:tree_1), mixins(:tree2_1), mixins(:tree3_1)], mixins(:tree3_1).self_and_siblings
+ end
end
class TouchTest < Test::Unit::TestCase