ES6: Tests

This commit is contained in:
Robin Ward
2014-07-31 12:05:47 -04:00
parent 3b46b5ecbf
commit b8bfbcb3cb
19 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1,27 @@
moduleFor("controller:avatar-selector", "controller:avatar-selector", {
needs: ['controller:modal']
});
test("avatarTemplate", function() {
var avatarSelectorController = this.subject();
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");
});