CFE-12 complete change password test and mock for handle api

This commit is contained in:
Yasiu1376
2023-10-07 11:39:43 +03:30
parent 4cf388e920
commit 7902e92df2
3 changed files with 100 additions and 108 deletions

View File

@@ -1,8 +1,17 @@
import {GET_USER_ROUTE} from "@/core/data/apiRoutes";
import {GET_USER_ROUTE, SET_USER_PASSWORD} from "@/core/data/apiRoutes";
import {rest} from "msw";
export const handler = [rest.get(GET_USER_ROUTE, (req, res, ctx) => {
return res(ctx.json({
id: 10
}))
})]
export const handler = [
rest.get(GET_USER_ROUTE, (req, res, ctx) => {
return res(ctx.json({
data:{
id: 10
}
}))
}),
rest.post(SET_USER_PASSWORD, (req, res, ctx) => {
return res(
ctx.status(200),
);
}),
]