more test fixes

pull/351/head
Tim Felgentreff 14 years ago
parent 4a2f5d37a0
commit 759313b181
  1. 3
      app/controllers/issue_moves_controller.rb
  2. 1
      test/functional/issues_controller_test.rb
  3. 2
      test/functional/search_controller_test.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

@ -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

@ -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']

Loading…
Cancel
Save