mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
add a site setting for allowing animated avatars
This commit is contained in:
@ -132,3 +132,16 @@ test("avatarImg", function() {
|
||||
blank(Discourse.Utilities.avatarImg({avatarTemplate: "", size: 'tiny'}),
|
||||
"it doesn't render avatars for invalid avatar template");
|
||||
});
|
||||
|
||||
module("Discourse.Utilities.cropAvatar with animated avatars", {
|
||||
setup: function() { Discourse.SiteSettings.allow_animated_avatars = true; }
|
||||
});
|
||||
|
||||
asyncTestDiscourse("cropAvatar", function() {
|
||||
expect(1);
|
||||
|
||||
Discourse.Utilities.cropAvatar("/path/to/avatar.gif", "image/gif").then(function(avatarTemplate) {
|
||||
equal(avatarTemplate, "/path/to/avatar.gif", "returns the url to the gif when animated gif are enabled");
|
||||
start();
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user