Separated ReportsController#issue_report into two separate actions.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3396 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -48,12 +48,32 @@ class ReportsControllerTest < ActionController::TestCase
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def test_issue_report_details
|
||||
|
||||
context "GET :issue_report_details" do
|
||||
%w(tracker version priority category assigned_to author subproject).each do |detail|
|
||||
get :issue_report, :id => 1, :detail => detail
|
||||
assert_response :success
|
||||
assert_template 'issue_report_details'
|
||||
context "for #{detail}" do
|
||||
setup do
|
||||
get :issue_report_details, :id => 1, :detail => detail
|
||||
end
|
||||
|
||||
should_respond_with :success
|
||||
should_render_template :issue_report_details
|
||||
should_assign_to :field
|
||||
should_assign_to :rows
|
||||
should_assign_to :data
|
||||
should_assign_to :report_title
|
||||
end
|
||||
end
|
||||
|
||||
context "with an invalid detail" do
|
||||
setup do
|
||||
get :issue_report_details, :id => 1, :detail => 'invalid'
|
||||
end
|
||||
|
||||
should_respond_with :redirect
|
||||
should_redirect_to('the issue report') {{:controller => 'reports', :action => 'issue_report', :id => 'ecookbook'}}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user