summaryrefslogtreecommitdiffstats
path: root/test/functional/versions_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-11-09 18:53:12 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-11-09 18:53:12 +0000
commit8f40750ad7f7ad512fd816757f072c42fae20e66 (patch)
tree175905e0aaa657f33542ead952f80e6abe68a26e /test/functional/versions_controller_test.rb
parentcc684803bac964114319a39d52fd12fc84864a02 (diff)
downloadredmine-8f40750ad7f7ad512fd816757f072c42fae20e66.tar.gz
redmine-8f40750ad7f7ad512fd816757f072c42fae20e66.zip
Adds a link to automatically close completed versions in project settings (#1245).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3023 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/versions_controller_test.rb')
-rw-r--r--test/functional/versions_controller_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/versions_controller_test.rb b/test/functional/versions_controller_test.rb
index 4343b887a..ebac584c4 100644
--- a/test/functional/versions_controller_test.rb
+++ b/test/functional/versions_controller_test.rb
@@ -47,6 +47,14 @@ class VersionsControllerTest < ActionController::TestCase
assert_template 'edit'
end
+ def test_close_completed
+ Version.update_all("status = 'open'")
+ @request.session[:user_id] = 2
+ post :close_completed, :project_id => 'ecookbook'
+ assert_redirected_to :controller => 'projects', :action => 'settings', :tab => 'versions', :id => 'ecookbook'
+ assert_not_nil Version.find_by_status('closed')
+ end
+
def test_post_edit
@request.session[:user_id] = 2
post :edit, :id => 2,