Add unit tests on Login component
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
20
js/tests/unit/specs/mocks/auth.ts
Normal file
20
js/tests/unit/specs/mocks/auth.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
export const loginMock = {
|
||||
email: "some@email.tld",
|
||||
password: "somepassword",
|
||||
};
|
||||
|
||||
export const loginResponseMock = {
|
||||
data: {
|
||||
login: {
|
||||
__typename: "Login",
|
||||
accessToken: "some access token",
|
||||
refreshToken: "some refresh token",
|
||||
user: {
|
||||
__typename: "User",
|
||||
email: "some@email.tld",
|
||||
id: "1",
|
||||
role: "ADMINISTRATOR",
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user