feat: add tests for all resolvers

This commit is contained in:
Lakhan Samani
2021-12-24 06:27:39 +05:30
parent 6e9370458b
commit 30cde3e521
21 changed files with 577 additions and 189 deletions

View File

@@ -113,7 +113,8 @@ func UpdateProfile(ctx context.Context, params model.UpdateProfileInput) (*model
}
newEmail := strings.ToLower(*params.Email)
// check if user with new email exists
_, err = db.Mgr.GetUserByEmail(newEmail)
_, err := db.Mgr.GetUserByEmail(newEmail)
// err = nil means user exists
if err == nil {
return res, fmt.Errorf("user with this email address already exists")