Skip to content

Commit

Permalink
fix formatting | fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettladley committed Feb 16, 2024
1 parent 103b691 commit 3005f9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion backend/tests/api/helpers/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ func (app *TestApp) authStudent() {
"password": rawPassword,
},
})

if err != nil {
panic(err)
}
Expand Down
8 changes: 2 additions & 6 deletions backend/tests/api/user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,6 @@ func TestUpdateUserWorks(t *testing.T) {
}

func TestUpdateUserFailsOnInvalidBody(t *testing.T) {
appAssert := h.InitTest(t)

for _, invalidData := range []map[string]interface{}{
{"email": "[email protected]"},
{"nuid": "1800-123-4567"},
Expand All @@ -219,7 +217,7 @@ func TestUpdateUserFailsOnInvalidBody(t *testing.T) {
} {
invalidData := invalidData

appAssert.TestOnErrorAndTester(
h.InitTest(t).TestOnErrorAndTester(
h.TestRequest{
Method: fiber.MethodPatch,
Path: "/api/v1/users/:userID",
Expand All @@ -231,10 +229,8 @@ func TestUpdateUserFailsOnInvalidBody(t *testing.T) {
Error: errors.FailedToValidateUser,
Tester: TestNumUsersRemainsAt2,
},
)
).Close()
}

appAssert.Close()
}

func TestUpdateUserFailsBadRequest(t *testing.T) {
Expand Down

0 comments on commit 3005f9d

Please sign in to comment.