[Git][noosfero/noosfero][master] 2 commits: Allows to get original profile_icon without crash generic icon
Rodrigo Souto
gitlab at mg.gitlab.com
Fri Jun 8 11:48:01 BRT 2018
Rodrigo Souto pushed to branch master at Noosfero / noosfero
Commits:
f37ee3b7 by Aurélio A. Heckert at 2018-04-17T21:57:57Z
Allows to get original profile_icon without crash generic icon
- - - - -
100b5343 by Rodrigo Souto at 2018-06-08T14:47:55Z
Merge branch 'big_icon' into 'master'
Allows to get original profile_icon without crash generic icon
See merge request noosfero/noosfero!1437
- - - - -
2 changed files:
- app/helpers/profile_image_helper.rb
- test/unit/profile_image_helper_test.rb
Changes:
=====================================
app/helpers/profile_image_helper.rb
=====================================
--- a/app/helpers/profile_image_helper.rb
+++ b/app/helpers/profile_image_helper.rb
@@ -49,6 +49,7 @@ module ProfileImageHelper
filename = profile.image.public_filename(size)
mimetype = profile.image.content_type
else
+ size = :big if size.blank?
icon =
if profile.organization?
if profile.kind_of?(Community)
=====================================
test/unit/profile_image_helper_test.rb
=====================================
--- a/test/unit/profile_image_helper_test.rb
+++ b/test/unit/profile_image_helper_test.rb
@@ -92,6 +92,14 @@ class ProfileImageHelperTest < ActionView::TestCase
assert_not_nil mime
end
+ should 'get big gravatar when user force get original profile icon' do
+ stubs(:profile).returns(Person.new)
+ stubs(:current_theme).returns('default')
+
+ filename = profile_icon(Person.new, '')
+ assert_match /gravatar\.com\/.*\bsize=150\b/, filename
+ end
+
should 'provide sex icon for males' do
stubs(:environment).returns(Environment.default)
expects(:content_tag).with(anything, 'male').returns('MALE!!')
View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/77acde2dc87489c3ddddafca260686a4b6c4de31...100b534312516775811d7ef0bd19c9b6c0dc1cba
--
View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/77acde2dc87489c3ddddafca260686a4b6c4de31...100b534312516775811d7ef0bd19c9b6c0dc1cba
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20180608/d121e252/attachment-0001.html>
More information about the Noosfero-dev
mailing list