diff --git a/delivery/http_server/end2end/benefactor_kindboxreqs_test.go b/delivery/http_server/end2end/benefactor_kindboxreqs_test.go index cab5876..78da216 100644 --- a/delivery/http_server/end2end/benefactor_kindboxreqs_test.go +++ b/delivery/http_server/end2end/benefactor_kindboxreqs_test.go @@ -32,6 +32,11 @@ type BenefactorKindBoxReqsTestSuite struct { updateData benefactorkindboxreqparam.KindBoxReqUpdateRequest } +// TestBenefactorKindBoxReqsTestSuite is the entry point for the test suite +func TestBenefactorKindBoxReqsTestSuite(t *testing.T) { + suite.Run(t, new(BenefactorKindBoxReqsTestSuite)) +} + // SetupTest runs before each test in the suite func (suite *BenefactorKindBoxReqsTestSuite) SetupTest() { teardown := setup.SeedMariaDB(testContainer.GetMariaDBConfig()) @@ -71,6 +76,7 @@ func (suite *BenefactorKindBoxReqsTestSuite) SetupTest() { } // loginBenefactor authenticates the benefactor and returns an access token +// TODO: Move this to a common utility function func (suite *BenefactorKindBoxReqsTestSuite) loginBenefactor() string { sendOTPRes, err := services.BenefactorSvc.SendOtp(context.Background(), benefactoreparam.SendOtpRequest{ PhoneNumber: suite.benefactorPhone, @@ -87,6 +93,7 @@ func (suite *BenefactorKindBoxReqsTestSuite) loginBenefactor() string { } // createRequest is a utility function to create and send HTTP requests +// TODO: Move this to a common utility function func (suite *BenefactorKindBoxReqsTestSuite) createRequest(method, url string, body interface{}) *httptest.ResponseRecorder { var buf bytes.Buffer if body != nil { @@ -190,8 +197,3 @@ func (suite *BenefactorKindBoxReqsTestSuite) TestBenefactorKindBoxReqs_Delete_Su ) suite.Require().Error(err) } - -// TestBenefactorKindBoxReqsTestSuite is the entry point for the test suite -func TestBenefactorKindBoxReqsTestSuite(t *testing.T) { - suite.Run(t, new(BenefactorKindBoxReqsTestSuite)) -}