@@ -26,7 +26,7 class PreviewsController < ApplicationController | |||
|
26 | 26 | if @description && @description.gsub(/(\r?\n|\n\r?)/, "\n") == @issue.description.to_s.gsub(/(\r?\n|\n\r?)/, "\n") |
|
27 | 27 | @description = nil |
|
28 | 28 | end |
|
29 | @notes = params[:notes] | |
|
29 | @notes = (params[:issue] ? params[:issue][:notes] : nil) | |
|
30 | 30 | else |
|
31 | 31 | @description = (params[:issue] ? params[:issue][:description] : nil) |
|
32 | 32 | end |
@@ -40,8 +40,7 class PreviewsControllerTest < ActionController::TestCase | |||
|
40 | 40 | def test_preview_issue_notes |
|
41 | 41 | @request.session[:user_id] = 2 |
|
42 | 42 | post :issue, :project_id => '1', :id => 1, |
|
43 |
:issue => {:description => Issue.find(1).description} |
|
|
44 | :notes => 'Foo' | |
|
43 | :issue => {:description => Issue.find(1).description, :notes => 'Foo'} | |
|
45 | 44 | assert_response :success |
|
46 | 45 | assert_template 'preview' |
|
47 | 46 | assert_not_nil assigns(:notes) |
@@ -49,7 +48,7 class PreviewsControllerTest < ActionController::TestCase | |||
|
49 | 48 | |
|
50 | 49 | def test_preview_journal_notes_for_update |
|
51 | 50 | @request.session[:user_id] = 2 |
|
52 | post :issue, :project_id => '1', :id => 1, :notes => 'Foo' | |
|
51 | post :issue, :project_id => '1', :id => 1, :issue => {:notes => 'Foo'} | |
|
53 | 52 | assert_response :success |
|
54 | 53 | assert_template 'preview' |
|
55 | 54 | assert_not_nil assigns(:notes) |
General Comments 0
You need to be logged in to leave comments.
Login now