mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 20:04:02 +08:00
correct spec
This commit is contained in:
parent
db7c878f3d
commit
878ae7628f
|
@ -11,6 +11,8 @@ describe UserAvatarsController do
|
||||||
SiteSetting.s3_upload_bucket = "test"
|
SiteSetting.s3_upload_bucket = "test"
|
||||||
SiteSetting.s3_cdn_url = "http://cdn.com"
|
SiteSetting.s3_cdn_url = "http://cdn.com"
|
||||||
|
|
||||||
|
FakeWeb.register_uri(:get, "http://cdn.com/something/else", :body => 'image')
|
||||||
|
|
||||||
GlobalSetting.expects(:cdn_url).returns("http://awesome.com/boom")
|
GlobalSetting.expects(:cdn_url).returns("http://awesome.com/boom")
|
||||||
|
|
||||||
|
|
||||||
|
@ -30,7 +32,7 @@ describe UserAvatarsController do
|
||||||
expect(response).to redirect_to("http://awesome.com/boom/user_avatar/default/#{user.username_lower}/98/#{upload.id}_#{OptimizedImage::VERSION}.png")
|
expect(response).to redirect_to("http://awesome.com/boom/user_avatar/default/#{user.username_lower}/98/#{upload.id}_#{OptimizedImage::VERSION}.png")
|
||||||
|
|
||||||
get :show, size: 98, username: user.username, version: upload.id, hostname: 'default'
|
get :show, size: 98, username: user.username, version: upload.id, hostname: 'default'
|
||||||
expect(response).to redirect_to("http://cdn.com/something/else")
|
expect(response.body).to eq("image")
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'serves image even if size missing and its in local mode' do
|
it 'serves image even if size missing and its in local mode' do
|
||||||
|
|
Loading…
Reference in New Issue
Block a user