Commit 61fdd384 authored by Tim Felgentreff's avatar Tim Felgentreff

move issue journal reply to issue controller test, as each journalized…

move issue journal reply to issue controller test, as each journalized controller will now use the render_reply journals helper to reply
parent 53fd34fb
...@@ -36,7 +36,7 @@ class Issue < ActiveRecord::Base ...@@ -36,7 +36,7 @@ class Issue < ActiveRecord::Base
acts_as_customizable acts_as_customizable
acts_as_watchable 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' : '') } :event_type => Proc.new {|o| 'issue' + (o.closed? ? ' closed' : '') }
register_on_journal_formatter(:id, 'parent_id') register_on_journal_formatter(:id, 'parent_id')
......
...@@ -1077,4 +1077,12 @@ class IssuesControllerTest < ActionController::TestCase ...@@ -1077,4 +1077,12 @@ class IssuesControllerTest < ActionController::TestCase
:child => {:tag => 'form', :child => {:tag => 'form',
:child => {:tag => 'input', :attributes => {:name => 'issues', :type => 'hidden', :value => '1'}}} :child => {:tag => 'input', :attributes => {:name => 'issues', :type => 'hidden', :value => '1'}}}
end 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 end
...@@ -30,20 +30,6 @@ class JournalsControllerTest < ActionController::TestCase ...@@ -30,20 +30,6 @@ class JournalsControllerTest < ActionController::TestCase
@response = ActionController::TestResponse.new @response = ActionController::TestResponse.new
User.current = nil User.current = nil
end 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 def test_get_edit
@request.session[:user_id] = 1 @request.session[:user_id] = 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment