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

pull/351/head
Tim Felgentreff 14 years ago
parent 53fd34fbd0
commit 61fdd38435
  1. 2
      app/models/issue.rb
  2. 8
      test/functional/issues_controller_test.rb
  3. 14
      test/functional/journals_controller_test.rb

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

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

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

Loading…
Cancel
Save