summaryrefslogtreecommitdiffstats
path: root/test/functional/versions_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-11-01 13:13:32 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-11-01 13:13:32 +0000
commitdb2ecd30103b9b296b1eabb6a018c528c8a1ac8e (patch)
treea6d9c1606b34a430760836bcf40017b0feed79c2 /test/functional/versions_controller_test.rb
parentba56b3f76333408e3a4692d5e3214ec27db2f4fc (diff)
downloadredmine-db2ecd30103b9b296b1eabb6a018c528c8a1ac8e.tar.gz
redmine-db2ecd30103b9b296b1eabb6a018c528c8a1ac8e.zip
Fixed: "Template is missing" error when validation fails on version edit (#6766).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4354 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/versions_controller_test.rb')
-rw-r--r--test/functional/versions_controller_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/versions_controller_test.rb b/test/functional/versions_controller_test.rb
index e4ac5c068..50f33c69f 100644
--- a/test/functional/versions_controller_test.rb
+++ b/test/functional/versions_controller_test.rb
@@ -123,6 +123,15 @@ class VersionsControllerTest < ActionController::TestCase
assert_equal 'New version name', version.name
assert_equal Date.today, version.effective_date
end
+
+ def test_post_update_with_validation_failure
+ @request.session[:user_id] = 2
+ put :update, :id => 2,
+ :version => { :name => '',
+ :effective_date => Date.today.strftime("%Y-%m-%d")}
+ assert_response :success
+ assert_template 'edit'
+ end
def test_destroy
@request.session[:user_id] = 2