diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-02-03 16:49:16 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-02-03 16:49:16 +0000 |
commit | 778117fead2b420ba3f0206dbaae3b9ec6332ec1 (patch) | |
tree | 1032047d10a36b831c28607f93cbab50c351a5d8 /test/functional/reports_controller_test.rb | |
parent | 39c585740d45cbe50e3fed8a58834eb82532bea0 (diff) | |
download | redmine-778117fead2b420ba3f0206dbaae3b9ec6332ec1.tar.gz redmine-778117fead2b420ba3f0206dbaae3b9ec6332ec1.zip |
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
Diffstat (limited to 'test/functional/reports_controller_test.rb')
-rw-r--r-- | test/functional/reports_controller_test.rb | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/test/functional/reports_controller_test.rb b/test/functional/reports_controller_test.rb index ab33b3035..4f99a0a81 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 |