Fix rspec tests.
This commit is contained in:
parent
6057e17ae7
commit
a1d04a7a9a
|
@ -74,15 +74,15 @@ class LetterAvatar
|
|||
-size #{FULLSIZE}x#{FULLSIZE}
|
||||
xc:#{to_rgb(color)}
|
||||
-pointsize #{POINTSIZE}
|
||||
-fill '#FFFFFFCC'
|
||||
-font 'Helvetica'
|
||||
-fill #FFFFFFCC
|
||||
-font Helvetica
|
||||
-gravity Center
|
||||
-annotate -0+26 '#{letter}'
|
||||
-annotate -0+26 #{letter}
|
||||
-depth 8
|
||||
'#{filename}'
|
||||
#{filename}
|
||||
}
|
||||
|
||||
Discourse::Utils.execute_command('convert', instructions.join(" ".freeze)) rescue nil
|
||||
Discourse::Utils.execute_command('convert', *instructions)
|
||||
|
||||
## do not optimize image, it will end up larger than original
|
||||
filename
|
||||
|
@ -90,7 +90,7 @@ class LetterAvatar
|
|||
|
||||
def to_rgb(color)
|
||||
r,g,b = color
|
||||
"'rgb(#{r},#{g},#{b})'"
|
||||
"rgb(#{r},#{g},#{b})"
|
||||
end
|
||||
|
||||
def image_magick_version
|
||||
|
|
|
@ -10,7 +10,7 @@ describe UserAvatarsController do
|
|||
end
|
||||
|
||||
it 'returns an avatar if we are allowing the proxy' do
|
||||
response = get :show_proxy_letter, version: 'v2', letter: 'a', color: 'aaaaaa', size: 20
|
||||
response = get :show_proxy_letter, version: 'v2', letter: 'a', color: 'aaaaaa', size: 360
|
||||
expect(response.status).to eq(200)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue