diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-01-05 12:28:34 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-01-05 12:28:34 +0000 |
commit | 601148c5b11dd53a834e4dc738d33668970f9193 (patch) | |
tree | 41da71fb73027b0cd02acaa4246d47cb2a660322 /test/functional/gantts_controller_test.rb | |
parent | 9adb0c61a903eae9930a84510b25a8ed156ed4f8 (diff) | |
download | redmine-601148c5b11dd53a834e4dc738d33668970f9193.tar.gz redmine-601148c5b11dd53a834e4dc738d33668970f9193.zip |
Show precedes/follows and blocks/blocked relations on the Gantt diagram (#3436).
Based on Toshi MARUYAMA's patch.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11118 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, 16 insertions, 0 deletions
diff --git a/test/functional/gantts_controller_test.rb b/test/functional/gantts_controller_test.rb index 902eaff26..41b71d773 100644 --- a/test/functional/gantts_controller_test.rb +++ b/test/functional/gantts_controller_test.rb @@ -81,6 +81,22 @@ class GanttsControllerTest < ActionController::TestCase assert_no_tag 'a', :content => /Private child of eCookbook/ end + def test_gantt_should_display_relations + IssueRelation.delete_all + issue1 = Issue.generate!(:start_date => 1.day.from_now, :due_date => 3.day.from_now) + issue2 = Issue.generate!(:start_date => 1.day.from_now, :due_date => 3.day.from_now) + IssueRelation.create!(:issue_from => issue1, :issue_to => issue2, :relation_type => 'precedes') + + get :show + assert_response :success + + relations = assigns(:gantt).relations + assert_kind_of Hash, relations + assert relations.present? + assert_select 'div.task_todo[id=?][data-rels*=?]', "task-todo-issue-#{issue1.id}", issue2.id.to_s + assert_select 'div.task_todo[id=?][data-rels=?]', "task-todo-issue-#{issue2.id}", '{}' + end + def test_gantt_should_export_to_pdf get :show, :project_id => 1, :format => 'pdf' assert_response :success |