summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-09-27 22:12:11 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-09-27 22:12:11 +0000
commitf58ed6c206743c5217b829c5169bb2b302b8b127 (patch)
tree1daf5a52cf8dae799933b04b71e0b54a9444df1b /test
parentd255f7f5b0379df775c27e819d630d807f624319 (diff)
downloadredmine-f58ed6c206743c5217b829c5169bb2b302b8b127.tar.gz
redmine-f58ed6c206743c5217b829c5169bb2b302b8b127.zip
Fixed that issue author is assigned with current user when the edit form is updated (#11975).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10494 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/functional/issues_controller_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index b6e583fda..8f8f1e27b 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -2534,6 +2534,18 @@ class IssuesControllerTest < ActionController::TestCase
assert_equal 'This is the test_new issue', issue.subject
end
+ def test_update_edit_form_should_keep_issue_author
+ @request.session[:user_id] = 3
+ xhr :put, :new, :project_id => 1, :id => 1, :issue => {:subject => 'Changed'}
+ assert_response :success
+ assert_equal 'text/javascript', response.content_type
+
+ issue = assigns(:issue)
+ assert_equal User.find(2), issue.author
+ assert_equal 2, issue.author_id
+ assert_not_equal User.current, issue.author
+ end
+
def test_update_edit_form_should_propose_transitions_based_on_initial_status
@request.session[:user_id] = 2
WorkflowTransition.delete_all