Do not create projects in alphabetical order in nested set tests (#12431).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10865 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
921ad01bde
commit
be7895e04e
|
@ -28,17 +28,17 @@ class ProjectNestedSetTest < ActiveSupport::TestCase
|
|||
@a2 = Project.create!(:name => 'A2', :identifier => 'projecta2')
|
||||
@a2.set_parent!(@a)
|
||||
|
||||
@c = Project.create!(:name => 'C', :identifier => 'projectc')
|
||||
@c1 = Project.create!(:name => 'C1', :identifier => 'projectc1')
|
||||
@c1.set_parent!(@c)
|
||||
|
||||
@b = Project.create!(:name => 'B', :identifier => 'projectb')
|
||||
@b2 = Project.create!(:name => 'B2', :identifier => 'projectb2')
|
||||
@b2.set_parent!(@b)
|
||||
@b1 = Project.create!(:name => 'B1', :identifier => 'projectb1')
|
||||
@b1.set_parent!(@b)
|
||||
@b11 = Project.create!(:name => 'B11', :identifier => 'projectb11')
|
||||
@b11.set_parent!(@b1)
|
||||
@b2 = Project.create!(:name => 'B2', :identifier => 'projectb2')
|
||||
@b2.set_parent!(@b)
|
||||
|
||||
@c = Project.create!(:name => 'C', :identifier => 'projectc')
|
||||
@c1 = Project.create!(:name => 'C1', :identifier => 'projectc1')
|
||||
@c1.set_parent!(@c)
|
||||
|
||||
@a, @a1, @a2, @b, @b1, @b11, @b2, @c, @c1 = *(Project.all.sort_by(&:name))
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue