diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index a99bddc57..8b22df08a 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -973,6 +973,14 @@ RAW Setting.gravatar_enabled = '1' assert avatar(User.find_by_mail('jsmith@somenet.foo')).include?(Digest::MD5.hexdigest('jsmith@somenet.foo')) assert avatar('jsmith ').include?(Digest::MD5.hexdigest('jsmith@somenet.foo')) + # Default size is 50 + assert avatar('jsmith ').include?('size=50') + assert avatar('jsmith ', :size => 24).include?('size=24') + # Non-avatar options should be considered html options + assert avatar('jsmith ', :title => 'John Smith').include?('title="John Smith"') + # The default class of the img tag should be gravatar + assert avatar('jsmith ').include?('class="gravatar"') + assert !avatar('jsmith ', :class => 'picture').include?('class="gravatar"') assert_nil avatar('jsmith') assert_nil avatar(nil)