summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-12-20 09:05:23 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-12-20 09:05:23 +0000
commitf3c5056e399984f989350e49f74fc4337d01281d (patch)
tree8d3a441ee8d713527ae800611074c51b05dffca4 /test
parentac456fafc8c0f4f3fb28ca6ea23301ba3da88da7 (diff)
downloadredmine-f3c5056e399984f989350e49f74fc4337d01281d.tar.gz
redmine-f3c5056e399984f989350e49f74fc4337d01281d.zip
Merged r16071 (#24595).
git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@16099 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/project_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/unit/project_test.rb b/test/unit/project_test.rb
index 5c305f7bf..a3f2b7d45 100644
--- a/test/unit/project_test.rb
+++ b/test/unit/project_test.rb
@@ -205,6 +205,18 @@ class ProjectTest < ActiveSupport::TestCase
assert @ecookbook_sub1.unarchive
end
+ def test_unarchive_a_child_of_a_closed_project_should_set_status_to_closed
+ Project.find(1).close
+ child = Project.find(3)
+ assert_equal Project::STATUS_CLOSED, child.status
+
+ child.archive
+ assert_equal Project::STATUS_ARCHIVED, child.status
+
+ child.unarchive
+ assert_equal Project::STATUS_CLOSED, child.status
+ end
+
def test_destroy
# 2 active members
assert_equal 2, @ecookbook.members.size