discourse/test/javascripts/controllers/avatar_selector_controller_test.js
Sam Saffron 252e93d0f2 BUGFIX: support CDN for avatars
Correct broken spec
Implement S3 support
2014-05-27 14:40:46 +10:00

25 lines
740 B
JavaScript

module("controller:avatar-selector");
test("avatarTemplate", function() {
var avatarSelectorController = controllerFor('avatar-selector');
avatarSelectorController.setProperties({
selected: "system",
system_avatar_upload_id:1,
gravatar_avatar_upload_id:2,
custom_avatar_upload_id: 3
});
equal(avatarSelectorController.get("selectedUploadId"), 1,
"we are using system by default");
avatarSelectorController.set('selected', 'gravatar');
equal(avatarSelectorController.get("selectedUploadId"), 2,
"we are using gravatar when set");
avatarSelectorController.set("selected", "custom");
equal(avatarSelectorController.get("selectedUploadId"), 3,
"we are using custom when set");
});