diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-09-10 03:09:02 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-09-10 03:09:02 +0000 |
commit | bdb3937e0f4c8faceb463e23cb28676930ddbd9e (patch) | |
tree | 8d8a5d1b5b78b1b206363549f8635a2e3b29ff32 /test/functional/gantts_controller_test.rb | |
parent | 8d52608dbad63d504ec4b48ffe5ea09cfbe95bd9 (diff) | |
download | redmine-bdb3937e0f4c8faceb463e23cb28676930ddbd9e.tar.gz redmine-bdb3937e0f4c8faceb463e23cb28676930ddbd9e.zip |
Rewrite the Gantt chart. #6276
This version of the Gantt chart supports nested charts. So Projects,
Versions, and Issues will be nested underneath their parents correctly.
Additional features:
* Move all Gantt code to Redmine::Helpers::Gantt class instead of having it in
the Gantt class, controller, and view
* Recursive and nest sub-projects
* Recursive and nest versions
* Recursive and nest issues
* Draw a line showing when a Project is active and it's progress
* Draw a line showing when a Version is active and it's progress
* Show a version's % complete
* Change the color of Projects, Versions, and Issues if they are late or
behind schedule
* Added Project#start_date and #due_date
* Added Project#completed_percent
* Use a mini-gravatar on the Gantt chart
* Added tests for the Gantt rendering
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4072 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/gantts_controller_test.rb')
-rw-r--r-- | test/functional/gantts_controller_test.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/functional/gantts_controller_test.rb b/test/functional/gantts_controller_test.rb index 24c84f2ae..9aba1d5aa 100644 --- a/test/functional/gantts_controller_test.rb +++ b/test/functional/gantts_controller_test.rb @@ -5,20 +5,20 @@ class GanttsControllerTest < ActionController::TestCase context "#gantt" do should "work" do + i2 = Issue.find(2) + i2.update_attribute(:due_date, 1.month.from_now) + get :show, :project_id => 1 assert_response :success assert_template 'show.html.erb' assert_not_nil assigns(:gantt) - events = assigns(:gantt).events - assert_not_nil events # Issue with start and due dates i = Issue.find(1) assert_not_nil i.due_date - assert events.include?(Issue.find(1)) - # Issue with without due date but targeted to a version with date + assert_select "div a.issue", /##{i.id}/ + # Issue with on a targeted version should not be in the events but loaded in the html i = Issue.find(2) - assert_nil i.due_date - assert events.include?(i) + assert_select "div a.issue", /##{i.id}/ end should "work cross project" do @@ -26,8 +26,8 @@ class GanttsControllerTest < ActionController::TestCase assert_response :success assert_template 'show.html.erb' assert_not_nil assigns(:gantt) - events = assigns(:gantt).events - assert_not_nil events + assert_not_nil assigns(:gantt).query + assert_nil assigns(:gantt).project end should "export to pdf" do |