summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-03-28 15:17:46 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-03-28 15:17:46 +0000
commit2bbc948e06ef802588b25cf02f0de816f6fa0cc6 (patch)
tree69f41a0113709eaa30acd67d6a6b0b7022f6ba86 /test
parentc499d2d150c7e1818e8bfe2100a284cc02966af6 (diff)
downloadredmine-2bbc948e06ef802588b25cf02f0de816f6fa0cc6.tar.gz
redmine-2bbc948e06ef802588b25cf02f0de816f6fa0cc6.zip
Preview description if it was edited while updating an issue (#741).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3623 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/functional/issues_controller_test.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index 23d09152c..757f36c19 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -1271,6 +1271,22 @@ class IssuesControllerTest < ActionController::TestCase
:attributes => { :href => '#',
:class => 'icon-del disabled' }
end
+
+ def test_preview_new_issue
+ @request.session[:user_id] = 2
+ post :preview, :project_id => '1', :issue => {:description => 'Foo'}
+ assert_response :success
+ assert_template 'preview'
+ assert_not_nil assigns(:description)
+ end
+
+ def test_preview_notes
+ @request.session[:user_id] = 2
+ post :preview, :project_id => '1', :id => 1, :issue => {:description => Issue.find(1).description}, :notes => 'Foo'
+ assert_response :success
+ assert_template 'preview'
+ assert_not_nil assigns(:notes)
+ end
def test_auto_complete_routing
assert_routing(