test: add wrong params test cases for session create
This commit is contained in:
parent
350a6f86d9
commit
86832cf1f9
@ -85,6 +85,14 @@ func TestSessionCreate(t *testing.T) {
|
|||||||
Email: "unregistered@error.com",
|
Email: "unregistered@error.com",
|
||||||
Password: "strong password",
|
Password: "strong password",
|
||||||
}, usecase.UserNotExist},
|
}, usecase.UserNotExist},
|
||||||
|
{"wrong email", createParams{
|
||||||
|
Email: "error.com",
|
||||||
|
Password: "strong password",
|
||||||
|
}, UserParamsErr},
|
||||||
|
{"no passwrd", createParams{
|
||||||
|
Email: "no@error.com",
|
||||||
|
Password: "",
|
||||||
|
}, UserParamsErr},
|
||||||
}
|
}
|
||||||
|
|
||||||
token.Init("secret", 1*time.Second)
|
token.Init("secret", 1*time.Second)
|
||||||
|
Loading…
Reference in New Issue
Block a user