mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-12 00:31:48 -05:00
16 lines
513 B
JavaScript
16 lines
513 B
JavaScript
import avatarTemplate from 'discourse/lib/avatar-template';
|
|
|
|
module('lib:avatar-template');
|
|
|
|
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;
|
|
});
|
|
|