summaryrefslogtreecommitdiffstats
path: root/test/unit/project_nested_set_test.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-08-30 05:49:57 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-08-30 05:49:57 +0000
commit61626885569775ee530be592d96f2a142528e1fd (patch)
tree1e59899b5656414514116ac60bafcfa993be02db /test/unit/project_nested_set_test.rb
parentfce0c83c0a5818816da9dd78043e0636c55aae9f (diff)
downloadredmine-61626885569775ee530be592d96f2a142528e1fd.tar.gz
redmine-61626885569775ee530be592d96f2a142528e1fd.zip
remove trailing white-spaces from test/unit/project_nested_set_test.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6771 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/project_nested_set_test.rb')
-rw-r--r--test/unit/project_nested_set_test.rb24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/unit/project_nested_set_test.rb b/test/unit/project_nested_set_test.rb
index 9e9666529..e0a07229d 100644
--- a/test/unit/project_nested_set_test.rb
+++ b/test/unit/project_nested_set_test.rb
@@ -1,16 +1,16 @@
# Redmine - project management software
-# Copyright (C) 2006-2010 Jean-Philippe Lang
+# Copyright (C) 2006-2011 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -18,7 +18,7 @@
require File.expand_path('../../test_helper', __FILE__)
class ProjectNestedSetTest < ActiveSupport::TestCase
-
+
context "nested set" do
setup do
Project.delete_all
@@ -28,7 +28,7 @@ class ProjectNestedSetTest < ActiveSupport::TestCase
@a1.set_parent!(@a)
@a2 = Project.create!(:name => 'Project A2', :identifier => 'projecta2')
@a2.set_parent!(@a)
-
+
@b = Project.create!(:name => 'Project B', :identifier => 'projectb')
@b1 = Project.create!(:name => 'Project B1', :identifier => 'projectb1')
@b1.set_parent!(@b)
@@ -36,14 +36,14 @@ class ProjectNestedSetTest < ActiveSupport::TestCase
@b11.set_parent!(@b1)
@b2 = Project.create!(:name => 'Project B2', :identifier => 'projectb2')
@b2.set_parent!(@b)
-
+
@c = Project.create!(:name => 'Project C', :identifier => 'projectc')
@c1 = Project.create!(:name => 'Project C1', :identifier => 'projectc1')
@c1.set_parent!(@c)
-
+
[@a, @a1, @a2, @b, @b1, @b11, @b2, @c, @c1].each(&:reload)
end
-
+
context "#create" do
should "build valid tree" do
assert_nested_set_values({
@@ -59,7 +59,7 @@ class ProjectNestedSetTest < ActiveSupport::TestCase
})
end
end
-
+
context "#set_parent!" do
should "keep valid tree" do
assert_no_difference 'Project.count' do
@@ -75,7 +75,7 @@ class ProjectNestedSetTest < ActiveSupport::TestCase
})
end
end
-
+
context "#destroy" do
context "a root with children" do
should "not mess up the tree" do
@@ -91,7 +91,7 @@ class ProjectNestedSetTest < ActiveSupport::TestCase
})
end
end
-
+
context "a child with children" do
should "not mess up the tree" do
assert_difference 'Project.count', -2 do
@@ -107,7 +107,7 @@ class ProjectNestedSetTest < ActiveSupport::TestCase
end
end
end
-
+
def assert_nested_set_values(h)
assert Project.valid?
h.each do |project, expected|