From 759313b18192c9c9e6632cda4c4ce96a93a6b094 Mon Sep 17 00:00:00 2001 From: Tim Felgentreff Date: Fri, 5 Nov 2010 17:04:09 +0100 Subject: [PATCH] more test fixes --- app/controllers/issue_moves_controller.rb | 3 +-- test/functional/issues_controller_test.rb | 1 - test/functional/search_controller_test.rb | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/controllers/issue_moves_controller.rb b/app/controllers/issue_moves_controller.rb index f60707bf..d02d0b8c 100644 --- a/app/controllers/issue_moves_controller.rb +++ b/app/controllers/issue_moves_controller.rb @@ -17,8 +17,7 @@ class IssueMovesController < ApplicationController moved_issues = [] @issues.each do |issue| issue.reload - issue.init_journal(User.current) - issue.current_journal.notes = @notes if @notes.present? + issue.init_journal(User.current, @notes || "") call_hook(:controller_issues_move_before_save, { :params => params, :issue => issue, :target_project => @target_project, :copy => !!@copy }) if r = issue.move_to_project(@target_project, new_tracker, {:copy => @copy, :attributes => extract_changed_attributes_for_move(params)}) moved_issues << r diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index cd237f75..0b181d2b 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -808,7 +808,6 @@ class IssuesControllerTest < ActionController::TestCase assert_redirected_to :action => 'show', :id => '1' issue.reload - assert issue.journals.empty? # No email should be sent assert ActionMailer::Base.deliveries.empty? end diff --git a/test/functional/search_controller_test.rb b/test/functional/search_controller_test.rb index 58e3ca88..4c035d35 100644 --- a/test/functional/search_controller_test.rb +++ b/test/functional/search_controller_test.rb @@ -38,7 +38,7 @@ class SearchControllerTest < ActionController::TestCase assert assigns(:results).include?(Changeset.find(101)) assert_tag :dt, :attributes => { :class => /issue/ }, :child => { :tag => 'a', :content => /Add ingredients categories/ }, - :sibling => { :tag => 'dd', :content => /should be classified by categories/ } + :sibling => { :tag => 'dd', :content => /A comment with inline image: !picture.jpg!/ } assert assigns(:results_by_type).is_a?(Hash) assert_equal 5, assigns(:results_by_type)['changesets']