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
This commit is contained in:
Eric Davis 2010-02-03 16:49:16 +00:00
parent 39c585740d
commit 778117fead
1 changed files with 15 additions and 4 deletions

View File

@ -44,10 +44,21 @@ class ReportsControllerTest < ActionController::TestCase
end
def test_issue_report
context "GET :issue_report without details" do
setup do
get :issue_report, :id => 1
assert_response :success
assert_template 'issue_report'
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