discourse/test/javascripts/lib/avatar-template-test.js.es6
Robin Ward 9974a26c47 FEATURE: Can specify a list of default_avatars urls.
These new avatars will be used by new users until they upload their own
avatars. If left blank, letter avatars are used.
2015-03-03 16:19:29 -05:00

16 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;
});