2015-03-03 16:16:04 -05:00
|
|
|
import avatarTemplate from 'discourse/lib/avatar-template';
|
|
|
|
|
2015-08-07 15:08:27 -04:00
|
|
|
module('lib:avatar-template');
|
2015-03-03 16:16:04 -05:00
|
|
|
|
|
|
|
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;
|
|
|
|
});
|
|
|
|
|