Skip to content
This repository
Browse code

Added tests for acts_as_list with scope is null #378 [Tim Bates]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@292 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 9a5321fccfa95719732eec664f5d2f25e5e6cde4 1 parent f0a3397
David Heinemeier Hansson authored December 31, 2004

Showing 1 changed file with 6 additions and 0 deletions. Show diff stats Hide diff stats

  1. 6  activerecord/test/mixin_test.rb
6  activerecord/test/mixin_test.rb
@@ -137,6 +137,12 @@ def test_with_string_based_scope
137 137
     assert new.first?
138 138
     assert new.last?
139 139
   end 
  140
+
  141
+  def test_nil_scope
  142
+    new1, new2, new3 = ListMixin.create, ListMixin.create, ListMixin.create
  143
+    new2.move_higher
  144
+    assert_equal [new2, new1, new3], ListMixin.find_all("parent_id IS NULL", "pos")
  145
+  end
140 146
 end
141 147
 
142 148
 class TreeTest < Test::Unit::TestCase

0 notes on commit 9a5321f

Please sign in to comment.
Something went wrong with that request. Please try again.