summaryrefslogtreecommitdiffstats
path: root/test/functional/reports_controller_test.rb
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2010-02-08 17:53:58 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2010-02-08 17:53:58 +0000
commit597725d77ce07c1e297e83f2a3594bbe1902ab2e (patch)
treee04fc22500b752a4807eca8e8db9d5367e2fd43d /test/functional/reports_controller_test.rb
parent23c46c68abfae18e9aca19eb95941ecd1e74bb59 (diff)
downloadredmine-597725d77ce07c1e297e83f2a3594bbe1902ab2e.tar.gz
redmine-597725d77ce07c1e297e83f2a3594bbe1902ab2e.zip
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
Diffstat (limited to 'test/functional/reports_controller_test.rb')
-rw-r--r--test/functional/reports_controller_test.rb30
1 files changed, 25 insertions, 5 deletions
diff --git a/test/functional/reports_controller_test.rb b/test/functional/reports_controller_test.rb
index d9ef4942a..db9d9cda7 100644
--- a/test/functional/reports_controller_test.rb
+++ b/test/functional/reports_controller_test.rb
@@ -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