@@ -407,9 +407,9 class IssuesController < ApplicationController | |||
|
407 | 407 | def build_new_issue_from_params |
|
408 | 408 | if params[:id].blank? |
|
409 | 409 | @issue = Issue.new |
|
410 | @issue.init_journal(User.current) | |
|
411 | 410 | if params[:copy_from] |
|
412 | 411 | begin |
|
412 | @issue.init_journal(User.current) | |
|
413 | 413 | @copy_from = Issue.visible.find(params[:copy_from]) |
|
414 | 414 | @link_copy = link_copy?(params[:link_copy]) || request.get? |
|
415 | 415 | @copy_attachments = params[:copy_attachments].present? || request.get? |
@@ -2225,11 +2225,13 class IssuesControllerTest < ActionController::TestCase | |||
|
2225 | 2225 | |
|
2226 | 2226 | assert_difference 'Issue.count' do |
|
2227 | 2227 | assert_difference 'Attachment.count' do |
|
2228 | assert_no_difference 'Journal.count' do | |
|
2228 | 2229 | post :create, :project_id => 1, |
|
2229 | 2230 | :issue => { :tracker_id => '1', :subject => 'With attachment' }, |
|
2230 | 2231 | :attachments => {'1' => {'file' => uploaded_test_file('testfile.txt', 'text/plain'), 'description' => 'test file'}} |
|
2231 | 2232 | end |
|
2232 | 2233 | end |
|
2234 | end | |
|
2233 | 2235 | |
|
2234 | 2236 | issue = Issue.order('id DESC').first |
|
2235 | 2237 | attachment = Attachment.order('id DESC').first |
General Comments 0
You need to be logged in to leave comments.
Login now