replace shoulda context "#number_of_rows_on_project" at GanttHelperTest

git-svn-id: http://svn.redmine.org/redmine/trunk@12789 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2014-02-04 10:06:28 +00:00
parent 8543dfd109
commit 3ad3c691cc
1 changed files with 15 additions and 18 deletions

View File

@ -90,26 +90,23 @@ class Redmine::Helpers::GanttHelperTest < ActionView::TestCase
assert @gantt.truncated assert @gantt.truncated
end end
context "#number_of_rows_on_project" do test "#number_of_rows_on_project should count 0 for an empty the project" do
setup do create_gantt
create_gantt assert_equal 0, @gantt.number_of_rows_on_project(@project)
end end
should "count 0 for an empty the project" do test "#number_of_rows_on_project should count the number of issues without a version" do
assert_equal 0, @gantt.number_of_rows_on_project(@project) create_gantt
end @project.issues << Issue.generate!(:project => @project, :fixed_version => nil)
assert_equal 2, @gantt.number_of_rows_on_project(@project)
end
should "count the number of issues without a version" do test "#number_of_rows_on_project should count the number of issues on versions, including cross-project" do
@project.issues << Issue.generate!(:project => @project, :fixed_version => nil) create_gantt
assert_equal 2, @gantt.number_of_rows_on_project(@project) version = Version.generate!
end @project.versions << version
@project.issues << Issue.generate!(:project => @project, :fixed_version => version)
should "count the number of issues on versions, including cross-project" do assert_equal 3, @gantt.number_of_rows_on_project(@project)
version = Version.generate!
@project.versions << version
@project.issues << Issue.generate!(:project => @project, :fixed_version => version)
assert_equal 3, @gantt.number_of_rows_on_project(@project)
end
end end
# TODO: more of an integration test # TODO: more of an integration test