diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-06-10 12:18:09 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-06-10 12:18:09 +0000 |
commit | e29b0da1c8d9162a1ef36a7077053e43ce063948 (patch) | |
tree | 565c9f8618eedcac64755229d6f8966126152080 /test | |
parent | 867328848370abe67cea4d1604798dea20d0db4e (diff) | |
download | redmine-e29b0da1c8d9162a1ef36a7077053e43ce063948.tar.gz redmine-e29b0da1c8d9162a1ef36a7077053e43ce063948.zip |
Adds tests for #25775.
git-svn-id: http://svn.redmine.org/redmine/trunk@16656 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/issues_controller_test.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index c6c58b684..f1f9e1ae2 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -6376,4 +6376,32 @@ class IssuesControllerTest < Redmine::ControllerTest assert_response :success assert_select 'a[href=?][onclick=?]', "/issues/1", "", :text => 'Cancel' end + + def test_show_should_display_author_gravatar_only_when_not_assigned + issue = Issue.find(1) + assert_nil issue.assigned_to_id + @request.session[:user_id] = 1 + + with_settings :gravatar_enabled => '1' do + get :show, :id => issue.id + assert_select 'div.gravatar-with-child' do + assert_select 'img.gravatar', 1 + end + end + end + + def test_show_should_display_author_and_assignee_gravatars_when_assigned + issue = Issue.find(1) + issue.assigned_to_id = 2 + issue.save! + @request.session[:user_id] = 1 + + with_settings :gravatar_enabled => '1' do + get :show, :id => issue.id + assert_select 'div.gravatar-with-child' do + assert_select 'img.gravatar', 2 + assert_select 'img.gravatar-child', 1 + end + end + end end |