CFE-12 complete change password test and mock for handle api
This commit is contained in:
@@ -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),
|
||||
);
|
||||
}),
|
||||
]
|
||||
Reference in New Issue
Block a user