mirror of
https://github.com/redmine/redmine.git
synced 2025-11-07 22:05:56 +01:00
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:
@@ -90,27 +90,24 @@ 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
|
||||||
end
|
|
||||||
|
|
||||||
should "count 0 for an empty the project" do
|
|
||||||
assert_equal 0, @gantt.number_of_rows_on_project(@project)
|
assert_equal 0, @gantt.number_of_rows_on_project(@project)
|
||||||
end
|
end
|
||||||
|
|
||||||
should "count the number of issues without a version" do
|
test "#number_of_rows_on_project should count the number of issues without a version" do
|
||||||
|
create_gantt
|
||||||
@project.issues << Issue.generate!(:project => @project, :fixed_version => nil)
|
@project.issues << Issue.generate!(:project => @project, :fixed_version => nil)
|
||||||
assert_equal 2, @gantt.number_of_rows_on_project(@project)
|
assert_equal 2, @gantt.number_of_rows_on_project(@project)
|
||||||
end
|
end
|
||||||
|
|
||||||
should "count the number of issues on versions, including cross-project" do
|
test "#number_of_rows_on_project should count the number of issues on versions, including cross-project" do
|
||||||
|
create_gantt
|
||||||
version = Version.generate!
|
version = Version.generate!
|
||||||
@project.versions << version
|
@project.versions << version
|
||||||
@project.issues << Issue.generate!(:project => @project, :fixed_version => version)
|
@project.issues << Issue.generate!(:project => @project, :fixed_version => version)
|
||||||
assert_equal 3, @gantt.number_of_rows_on_project(@project)
|
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
|
||||||
context "#subjects" do
|
context "#subjects" do
|
||||||
|
|||||||
Reference in New Issue
Block a user