fix(medusa): Error messages for reset tokens (#3514)
* initial * reset password token handling * Create .changeset/old-planes-cross.md --------- Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
@@ -171,6 +171,16 @@ describe("/admin/users", () => {
|
||||
})
|
||||
|
||||
describe("Password reset", () => {
|
||||
it("Doesn't fail to fetch user when resetting password for an unknown email (unauthorized endpoint)", async () => {
|
||||
const api = useApi()
|
||||
|
||||
const resp = await api.post("/admin/users/password-token", {
|
||||
email: "test-doesnt-exist@test.com",
|
||||
})
|
||||
|
||||
expect(resp.status).toEqual(204)
|
||||
})
|
||||
|
||||
it("Doesn't fail when generating password reset token (unauthorized endpoint)", async () => {
|
||||
const api = useApi()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user