test: add wrong params test cases for session create
This commit is contained in:
		@ -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)
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user