diff options
author | Go MAEDA <maeda@farend.jp> | 2019-05-22 08:32:27 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-05-22 08:32:27 +0000 |
commit | fc51fd2c81191074476cc8c6fc2a954e3c032dc2 (patch) | |
tree | b4174b29b26f4fa50bfb40756b5090428895e6a7 /test/functional/versions_controller_test.rb | |
parent | cfdd150da8261ccbb707379f114d909f0d68999b (diff) | |
download | redmine-fc51fd2c81191074476cc8c6fc2a954e3c032dc2.tar.gz redmine-fc51fd2c81191074476cc8c6fc2a954e3c032dc2.zip |
Show assignee avatar in Roadmap and Version (#28510).
Patch by Marius BALTEANU.
git-svn-id: http://svn.redmine.org/redmine/trunk@18189 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/versions_controller_test.rb')
-rw-r--r-- | test/functional/versions_controller_test.rb | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/functional/versions_controller_test.rb b/test/functional/versions_controller_test.rb index b827a1fd3..7a9fe7fe8 100644 --- a/test/functional/versions_controller_test.rb +++ b/test/functional/versions_controller_test.rb @@ -98,12 +98,44 @@ class VersionsControllerTest < Redmine::ControllerTest end end + def test_index_should_show_issue_assignee + with_settings :gravatar_enabled => '1' do + Issue.generate!(:project_id => 3, :fixed_version_id => 4, :assigned_to => User.find_by_login('jsmith')) + Issue.generate!(:project_id => 3, :fixed_version_id => 4) + + get :index, :params => {:project_id => 3} + assert_response :success + + assert_select 'table.related-issues' do + assert_select 'tr.issue', :count => 2 do + assert_select 'img.gravatar[title=?]', 'Assignee: John Smith', :count => 1 + end + end + end + end + def test_show get :show, :params => {:id => 2} assert_response :success assert_select 'h2', :text => /1.0/ assert_select 'span[class=?]', 'badge badge-status-locked', :text => 'locked' + + # no issue avatar when gravatar is disabled + assert_select 'img.gravatar', :count => 0 + end + + def test_show_should_show_issue_assignee + with_settings :gravatar_enabled => '1' do + get :show, :params => {:id => 2} + assert_response :success + + assert_select 'table.related-issues' do + assert_select 'tr.issue td.assigned_to', :count => 2 do + assert_select 'img.gravatar[title=?]', 'Assignee: Dave Lopper', :count => 1 + end + end + end end def test_show_issue_calculations_should_take_into_account_only_visible_issues |