Meteor.changePassword -> Accounts.changePassword

This commit is contained in:
Nick Martin
2012-10-01 15:49:39 -07:00
parent 9392fbb51d
commit 0e5b8083b5
2 changed files with 3 additions and 3 deletions

View File

@@ -78,7 +78,7 @@
// @param oldPassword {String|null}
// @param newPassword {String}
// @param callback {Function(error|undefined)}
Meteor.changePassword = function (oldPassword, newPassword, callback) {
Accounts.changePassword = function (oldPassword, newPassword, callback) {
if (!Meteor.user()) {
callback && callback(new Error("Must be logged in to change password."));
return;

View File

@@ -101,14 +101,14 @@ if (Meteor.isClient) (function () {
},
// change password with bad old password.
function (test, expect) {
Meteor.changePassword(password2, password2, expect(function (error) {
Accounts.changePassword(password2, password2, expect(function (error) {
test.isTrue(error);
test.equal(Meteor.user().username, username);
}));
},
// change password with good old password.
function (test, expect) {
Meteor.changePassword(password, password2, expect(function (error) {
Accounts.changePassword(password, password2, expect(function (error) {
test.equal(error, undefined);
test.equal(Meteor.user().username, username);
}));