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:
parent
53fd34fbd0
commit
61fdd38435
@ -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
|
|||||||
: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
|
|||||||
@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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user