mirror of
https://github.com/discourse/discourse.git
synced 2024-12-16 08:46:30 +08:00
9974a26c47
These new avatars will be used by new users until they upload their own avatars. If left blank, letter avatars are used.
17 lines
508 B
JavaScript
17 lines
508 B
JavaScript
import avatarTemplate from 'discourse/lib/avatar-template';
|
|
|
|
module('avatarTemplate');
|
|
|
|
test("avatarTemplate", function(){
|
|
var oldCDN = Discourse.CDN;
|
|
var oldBase = Discourse.BaseUrl;
|
|
Discourse.BaseUrl = "frogs.com";
|
|
|
|
equal(avatarTemplate("sam", 1), "/user_avatar/frogs.com/sam/{size}/1.png");
|
|
Discourse.CDN = "http://awesome.cdn.com";
|
|
equal(avatarTemplate("sam", 1), "http://awesome.cdn.com/user_avatar/frogs.com/sam/{size}/1.png");
|
|
Discourse.CDN = oldCDN;
|
|
Discourse.BaseUrl = oldBase;
|
|
});
|
|
|