Skip to content

Commit

Permalink
trying to fix tests and linter
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmenendez committed Sep 20, 2024
1 parent 637f896 commit 227973d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/users_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func TestVerifyAccountHandler(t *testing.T) {
c.Assert(err, qt.IsNil)
resp, err = http.DefaultClient.Do(req)
c.Assert(err, qt.IsNil)
c.Assert(resp.StatusCode, qt.Equals, http.StatusUnauthorized)
c.Assert(resp.StatusCode, qt.Equals, http.StatusBadRequest)
c.Assert(resp.Body.Close(), qt.IsNil)
// try to login again
req, err = http.NewRequest(http.MethodPost, testURL(authLoginEndpoint), bytes.NewBuffer(jsonLogin))
Expand Down
3 changes: 2 additions & 1 deletion db/verifications_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ func TestSetVerificationCode(t *testing.T) {
c := qt.New(t)

nonExistingUserID := uint64(100)
c.Assert(db.SetVerificationCode(&User{ID: nonExistingUserID}, "testCode", CodeTypeAccountVerification, time.Now()), qt.Equals, ErrNotFound)
err := db.SetVerificationCode(&User{ID: nonExistingUserID}, "testCode", CodeTypeAccountVerification, time.Now())
c.Assert(err, qt.Equals, ErrNotFound)

userID, err := db.SetUser(&User{
Email: testUserEmail,
Expand Down

0 comments on commit 227973d

Please sign in to comment.