fix(user#user.changePassword): delete useless tests (#118)
This commit is contained in:
@@ -6,10 +6,6 @@ exports[`user .changePassword() : changes the actual user password 2`] = `[JsonR
|
||||
|
||||
exports[`user .changePassword() : fails trying to change the password with invalid oldPassword 1`] = `[JsonRpcError: invalid credentials]`;
|
||||
|
||||
exports[`user .changePassword() : fails trying to change the password without newPassword 1`] = `[JsonRpcError: invalid parameters]`;
|
||||
|
||||
exports[`user .changePassword() : fails trying to change the password without oldPassword 1`] = `[JsonRpcError: invalid parameters]`;
|
||||
|
||||
exports[`user .create() : creates a user with permission 1`] = `
|
||||
Object {
|
||||
"email": "wayne2@vates.fr",
|
||||
|
||||
@@ -99,26 +99,17 @@ describe("user", () => {
|
||||
).rejects.toMatchSnapshot();
|
||||
});
|
||||
|
||||
withData(
|
||||
{
|
||||
"fails trying to change the password without newPassword": {
|
||||
oldPassword: SIMPLE_USER.password,
|
||||
},
|
||||
"fails trying to change the password without oldPassword": {
|
||||
newPassword: "newpwd",
|
||||
},
|
||||
"fails trying to change the password with invalid oldPassword": {
|
||||
oldPassword: "falsepwd",
|
||||
newPassword: "newpwd",
|
||||
},
|
||||
},
|
||||
async data => {
|
||||
await xo.createTempUser(SIMPLE_USER);
|
||||
await testWithOtherConnection(SIMPLE_USER, xo =>
|
||||
expect(xo.call("user.changePassword", data)).rejects.toMatchSnapshot()
|
||||
);
|
||||
}
|
||||
);
|
||||
it("fails trying to change the password with invalid oldPassword", async () => {
|
||||
await xo.createTempUser(SIMPLE_USER);
|
||||
await testWithOtherConnection(SIMPLE_USER, xo =>
|
||||
expect(
|
||||
xo.call("user.changePassword", {
|
||||
oldPassword: "falsepwd",
|
||||
newPassword: "newpwd",
|
||||
})
|
||||
).rejects.toMatchSnapshot()
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe(".getAll() :", () => {
|
||||
|
||||
Reference in New Issue
Block a user