summaryrefslogtreecommitdiffstats
path: root/test/unit/project_nested_set_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-11-23 17:36:04 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-11-23 17:36:04 +0000
commitbe7895e04ec08afbb5f68e5f828ae729f0902bff (patch)
treeb6decb7bd64a3d1c778685e0dfc7b942172a63e5 /test/unit/project_nested_set_test.rb
parent921ad01bde137254bdddf07c045ec1836492ae01 (diff)
downloadredmine-be7895e04ec08afbb5f68e5f828ae729f0902bff.tar.gz
redmine-be7895e04ec08afbb5f68e5f828ae729f0902bff.zip
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
Diffstat (limited to 'test/unit/project_nested_set_test.rb')
-rw-r--r--test/unit/project_nested_set_test.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/unit/project_nested_set_test.rb b/test/unit/project_nested_set_test.rb
index 07d1a8f16..6f6aa1707 100644
--- a/test/unit/project_nested_set_test.rb
+++ b/test/unit/project_nested_set_test.rb
@@ -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