move issue journal reply to issue controller test, as each journalized controller will now use the render_reply journals helper to reply

This commit is contained in:
Tim Felgentreff 2010-09-15 17:50:20 +02:00
parent 53fd34fbd0
commit 61fdd38435
3 changed files with 9 additions and 15 deletions

View File

@ -36,7 +36,7 @@ class Issue < ActiveRecord::Base
acts_as_customizable
acts_as_watchable
acts_as_journalized :event_title => Proc.new {|o| "#{o.tracker.name} ##{o.journaled.id} (#{o.status}): #{o.subject}"},
acts_as_journalized :event_title => Proc.new {|o| "#{o.tracker.name} ##{o.journaled_id} (#{o.status}): #{o.subject}"},
:event_type => Proc.new {|o| 'issue' + (o.closed? ? ' closed' : '') }
register_on_journal_formatter(:id, 'parent_id')

View File

@ -1077,4 +1077,12 @@ class IssuesControllerTest < ActionController::TestCase
:child => {:tag => 'form',
:child => {:tag => 'input', :attributes => {:name => 'issues', :type => 'hidden', :value => '1'}}}
end
def test_reply_to_note
@request.session[:user_id] = 2
get :edit, :id => 1, :journal_id => 1
assert_response :success
assert_select_rjs :show, "update"
end
end

View File

@ -30,20 +30,6 @@ class JournalsControllerTest < ActionController::TestCase
@response = ActionController::TestResponse.new
User.current = nil
end
def test_reply_to_issue
@request.session[:user_id] = 2
get :new, :id => 1
assert_response :success
assert_select_rjs :show, "update"
end
def test_reply_to_note
@request.session[:user_id] = 2
get :new, :id => 1, :journal_id => 2
assert_response :success
assert_select_rjs :show, "update"
end
def test_get_edit
@request.session[:user_id] = 1