mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
BUGFIX: support CDN for avatars
Correct broken spec Implement S3 support
This commit is contained in:
parent
330ea82ce4
commit
252e93d0f2
5 changed files with 58 additions and 32 deletions
|
@ -25,3 +25,11 @@ test("isAllowedToUploadAFile", function() {
|
|||
user.setProperties({ admin: false, moderator: true });
|
||||
ok(user.isAllowedToUploadAFile("image"), "moderator can always upload a file");
|
||||
});
|
||||
|
||||
test("avatarTemplate", function(){
|
||||
var oldCDN = Discourse.CDN;
|
||||
equal(Discourse.avatarTemplate("sam", 1), "/user_avatar/sam/{size}/1.png");
|
||||
Discourse.CDN = "http://awesome.cdn.com";
|
||||
equal(Discourse.avatarTemplate("sam", 1), "http://awesome.cdn.com/user_avatar/sam/{size}/1.png");
|
||||
var Discourse.CDN = oldCDN;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue