From 778117fead2b420ba3f0206dbaae3b9ec6332ec1 2010-02-03 16:49:16 From: Eric Davis Date: 2010-02-03 16:49:16 Subject: [PATCH] Converted a test to shoulda and added more checks for it's assignments. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3361 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/test/functional/reports_controller_test.rb b/test/functional/reports_controller_test.rb index ab33b30..4f99a0a 100644 --- a/test/functional/reports_controller_test.rb +++ b/test/functional/reports_controller_test.rb @@ -44,10 +44,21 @@ class ReportsControllerTest < ActionController::TestCase end - def test_issue_report - get :issue_report, :id => 1 - assert_response :success - assert_template 'issue_report' + context "GET :issue_report without details" do + setup do + get :issue_report, :id => 1 + end + + should_respond_with :success + should_render_template :issue_report + + [:issues_by_tracker, :issues_by_version, :issues_by_category, :issues_by_assigned_to, + :issues_by_author, :issues_by_subproject].each do |ivar| + should_assign_to ivar + should "set a value for #{ivar}" do + assert assigns[ivar.to_s].present? + end + end end def test_issue_report_details