Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettladley committed Feb 16, 2024
1 parent 3005f9d commit 820d47d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions backend/tests/api/user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,6 @@ func TestUpdateUserFailsOnInvalidBody(t *testing.T) {
}

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

badRequests := []string{
"0",
"-1",
Expand All @@ -249,17 +247,15 @@ func TestUpdateUserFailsBadRequest(t *testing.T) {
(*slightlyDifferentSampleStudentJSON)["first_name"] = "John"

for _, badRequest := range badRequests {
appAssert.TestOnError(h.TestRequest{
h.InitTest(t).TestOnError(h.TestRequest{
Method: fiber.MethodPatch,
Path: fmt.Sprintf("/api/v1/users/%s", badRequest),
Body: slightlyDifferentSampleStudentJSON,
Role: &models.Student,
},
errors.FailedToValidateID,
)
).Close()
}

appAssert.Close()
}

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

0 comments on commit 820d47d

Please sign in to comment.