diff --git a/backend/tests/api/category_tag_test.go b/backend/tests/api/category_tag_test.go index 888c28147..d7165c885 100644 --- a/backend/tests/api/category_tag_test.go +++ b/backend/tests/api/category_tag_test.go @@ -76,7 +76,7 @@ func TestGetCategoryTagsFailsCategoryBadRequest(t *testing.T) { } for _, badRequest := range badRequests { - appAssert.TestOnError( + appAssert = appAssert.TestOnError( h.TestRequest{ Method: fiber.MethodGet, Path: fmt.Sprintf("/api/v1/categories/%s/tags", badRequest), @@ -140,7 +140,7 @@ func TestGetCategoryTagFailsCategoryBadRequest(t *testing.T) { } for _, badRequest := range badRequests { - appAssert.TestOnError( + appAssert = appAssert.TestOnError( h.TestRequest{ Method: fiber.MethodGet, Path: fmt.Sprintf("/api/v1/categories/%s/tags/%s", badRequest, tagUUID), @@ -164,7 +164,7 @@ func TestGetCategoryTagFailsTagBadRequest(t *testing.T) { } for _, badRequest := range badRequests { - appAssert.TestOnError( + appAssert = appAssert.TestOnError( h.TestRequest{ Method: fiber.MethodGet, Path: fmt.Sprintf("/api/v1/categories/%s/tags/%s", categoryUUID, badRequest), diff --git a/backend/tests/api/category_test.go b/backend/tests/api/category_test.go index 921adf4bf..6bf679046 100644 --- a/backend/tests/api/category_test.go +++ b/backend/tests/api/category_test.go @@ -177,7 +177,7 @@ func TestCreateCategoryFailsIfCategoryWithThatNameAlreadyExists(t *testing.T) { modifiedSampleCategoryBody := *SampleCategoryFactory() modifiedSampleCategoryBody["name"] = permutation - existingAppAssert.TestOnErrorAndTester( + existingAppAssert = existingAppAssert.TestOnErrorAndTester( h.TestRequest{ Method: fiber.MethodPost, Path: "/api/v1/categories/", @@ -224,7 +224,7 @@ func TestGetCategoryFailsBadRequest(t *testing.T) { } for _, badRequest := range badRequests { - appAssert.TestOnError( + appAssert = appAssert.TestOnError( h.TestRequest{ Method: fiber.MethodGet, Path: fmt.Sprintf("/api/v1/categories/%s", badRequest), @@ -370,7 +370,7 @@ func TestUpdateCategoryFailsBadRequest(t *testing.T) { } for _, badRequest := range badRequests { - appAssert.TestOnError( + appAssert = appAssert.TestOnError( h.TestRequest{ Method: fiber.MethodPatch, Path: fmt.Sprintf("/api/v1/categories/%s", badRequest), @@ -412,7 +412,7 @@ func TestDeleteCategoryFailsBadRequest(t *testing.T) { } for _, badRequest := range badRequests { - existingAppAssert.TestOnErrorAndTester( + existingAppAssert = existingAppAssert.TestOnErrorAndTester( h.TestRequest{ Method: fiber.MethodDelete, Path: fmt.Sprintf("/api/v1/categories/%s", badRequest), diff --git a/backend/tests/api/club_tag_test.go b/backend/tests/api/club_tag_test.go index 3aade82c2..250d335ed 100644 --- a/backend/tests/api/club_tag_test.go +++ b/backend/tests/api/club_tag_test.go @@ -56,7 +56,7 @@ func TestCreateClubTagsFailsOnInvalidDataType(t *testing.T) { malformedTag := *SampleTagIDsFactory(nil) malformedTag["tags"] = tag - appAssert.TestOnError( + appAssert = appAssert.TestOnError( h.TestRequest{ Method: fiber.MethodPost, Path: fmt.Sprintf("/api/v1/clubs/%s/tags/", clubUUID), diff --git a/backend/tests/api/club_test.go b/backend/tests/api/club_test.go index b7863fe24..6f6059770 100644 --- a/backend/tests/api/club_test.go +++ b/backend/tests/api/club_test.go @@ -233,7 +233,7 @@ func AssertCreateBadClubDataFails(t *testing.T, jsonKey string, badValues []inte sampleClubPermutation := *SampleClubFactory(&uuid) sampleClubPermutation[jsonKey] = badValue - appAssert.TestOnErrorAndTester( + appAssert = appAssert.TestOnErrorAndTester( h.TestRequest{ Method: fiber.MethodPost, Path: "/api/v1/clubs/", @@ -341,7 +341,7 @@ func TestUpdateClubFailsOnInvalidBody(t *testing.T) { {"logo": "@12394X_2"}, } { invalidData := invalidData - appAssert.TestOnErrorAndTester( + appAssert = appAssert.TestOnErrorAndTester( h.TestRequest{ Method: fiber.MethodPatch, Path: fmt.Sprintf("/api/v1/clubs/%s", clubUUID), @@ -399,7 +399,7 @@ func TestUpdateClubFailsBadRequest(t *testing.T) { sampleStudent, rawPassword := h.SampleStudentFactory() for _, badRequest := range badRequests { - appAssert.TestOnError( + appAssert = appAssert.TestOnError( h.TestRequest{ Method: fiber.MethodPatch, Path: fmt.Sprintf("/api/v1/clubs/%s", badRequest), @@ -487,7 +487,7 @@ func TestDeleteClubBadRequest(t *testing.T) { } for _, badRequest := range badRequests { - appAssert.TestOnError( + appAssert = appAssert.TestOnError( h.TestRequest{ Method: fiber.MethodDelete, Path: fmt.Sprintf("/api/v1/clubs/%s", badRequest), diff --git a/backend/tests/api/tag_test.go b/backend/tests/api/tag_test.go index 77c42fea7..6bb186fb4 100644 --- a/backend/tests/api/tag_test.go +++ b/backend/tests/api/tag_test.go @@ -111,7 +111,7 @@ func TestCreateTagFailsBadRequest(t *testing.T) { for _, badBody := range badBodys { badBody := badBody - appAssert.TestOnErrorAndTester( + appAssert = appAssert.TestOnErrorAndTester( h.TestRequest{ Method: fiber.MethodPost, Path: "/api/v1/tags/", @@ -143,7 +143,7 @@ func TestCreateTagFailsValidation(t *testing.T) { for _, badBody := range badBodys { badBody := badBody - appAssert.TestOnErrorAndTester( + appAssert = appAssert.TestOnErrorAndTester( h.TestRequest{ Method: fiber.MethodPost, Path: "/api/v1/tags/", @@ -190,7 +190,7 @@ func TestGetTagFailsBadRequest(t *testing.T) { } for _, badRequest := range badRequests { - appAssert.TestOnError( + appAssert = appAssert.TestOnError( h.TestRequest{ Method: fiber.MethodGet, Path: fmt.Sprintf("/api/v1/tags/%s", badRequest), @@ -314,7 +314,7 @@ func TestUpdateTagFailsBadRequest(t *testing.T) { } for _, badRequest := range badRequests { - appAssert.TestOnError( + appAssert = appAssert.TestOnError( h.TestRequest{ Method: fiber.MethodPatch, Path: fmt.Sprintf("/api/v1/tags/%s", badRequest), @@ -356,7 +356,7 @@ func TestDeleteTagFailsBadRequest(t *testing.T) { } for _, badRequest := range badRequests { - appAssert.TestOnErrorAndTester( + appAssert = appAssert.TestOnErrorAndTester( h.TestRequest{ Method: fiber.MethodDelete, Path: fmt.Sprintf("/api/v1/tags/%s", badRequest), diff --git a/backend/tests/api/user_tag_test.go b/backend/tests/api/user_tag_test.go index e6962f1bb..e6a200c50 100644 --- a/backend/tests/api/user_tag_test.go +++ b/backend/tests/api/user_tag_test.go @@ -61,7 +61,7 @@ func CreateSetOfTags(appAssert h.ExistingAppAssert) ([]uuid.UUID, h.ExistingAppA categoryIDs := []uuid.UUID{} for _, category := range *categories { category := category - appAssert.TestOnStatusAndTester( + appAssert = appAssert.TestOnStatusAndTester( h.TestRequest{ Method: fiber.MethodPost, Path: "/api/v1/categories/", @@ -88,7 +88,7 @@ func CreateSetOfTags(appAssert h.ExistingAppAssert) ([]uuid.UUID, h.ExistingAppA tagIDs := []uuid.UUID{} for _, tag := range *tags { tag := tag - appAssert.TestOnStatusAndTester( + appAssert = appAssert.TestOnStatusAndTester( h.TestRequest{ Method: fiber.MethodPost, Path: "/api/v1/tags/", diff --git a/backend/tests/api/user_test.go b/backend/tests/api/user_test.go index 272443e55..20e1d0ebe 100644 --- a/backend/tests/api/user_test.go +++ b/backend/tests/api/user_test.go @@ -121,7 +121,7 @@ func TestGetUserFailsBadRequest(t *testing.T) { } for _, badRequest := range badRequests { - appAssert.TestOnError( + appAssert = appAssert.TestOnError( h.TestRequest{ Method: fiber.MethodGet, Path: fmt.Sprintf("/api/v1/users/%s", badRequest), @@ -333,7 +333,7 @@ func TestDeleteUserBadRequest(t *testing.T) { } for _, badRequest := range badRequests { - appAssert.TestOnErrorAndTester( + appAssert = appAssert.TestOnErrorAndTester( h.TestRequest{ Method: fiber.MethodDelete, Path: fmt.Sprintf("/api/v1/users/%s", badRequest), @@ -498,7 +498,7 @@ func AssertCreateBadDataFails(t *testing.T, jsonKey string, badValues []interfac sampleUserPermutation := *h.SampleStudentJSONFactory(sampleStudent, rawPassword) sampleUserPermutation[jsonKey] = badValue - appAssert.TestOnErrorAndTester( + appAssert = appAssert.TestOnErrorAndTester( h.TestRequest{ Method: fiber.MethodPost, Path: "/api/v1/users/", @@ -592,7 +592,7 @@ func TestCreateUserFailsOnMissingFields(t *testing.T) { sampleUserPermutation := *h.SampleStudentJSONFactory(sampleStudent, rawPassword) delete(sampleUserPermutation, missingField) - appAssert.TestOnErrorAndTester( + appAssert = appAssert.TestOnErrorAndTester( h.TestRequest{ Method: fiber.MethodPost, Path: "/api/v1/users/",