mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Make acts_as_list work for insert_at(1) #1966 [hensleyl@papermountain.org]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2008 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -142,6 +142,15 @@ class ListTest < Test::Unit::TestCase
|
||||
|
||||
new4.reload
|
||||
assert_equal 4, new4.pos
|
||||
|
||||
new5 = ListMixin.create("parent_id" => 20)
|
||||
assert_equal 5, new5.pos
|
||||
|
||||
new5.insert_at(1)
|
||||
assert_equal 1, new5.pos
|
||||
|
||||
new4.reload
|
||||
assert_equal 5, new4.pos
|
||||
end
|
||||
|
||||
def test_delete_middle
|
||||
|
||||
Reference in New Issue
Block a user