From be3718f6e4c7bb229f9eb78b44c52d14399977cc Mon Sep 17 00:00:00 2001 From: Daenney Date: Mon, 7 Aug 2023 19:38:11 +0200 Subject: [chore] Use generic pointer function (#2080) This replaces the different $TypePtr functions with a generic implementation. --- internal/api/client/admin/reportresolve_test.go | 2 +- internal/api/client/admin/reportsget_test.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'internal/api/client/admin') diff --git a/internal/api/client/admin/reportresolve_test.go b/internal/api/client/admin/reportresolve_test.go index 754dbb443..087080a70 100644 --- a/internal/api/client/admin/reportresolve_test.go +++ b/internal/api/client/admin/reportresolve_test.go @@ -138,7 +138,7 @@ func (suite *ReportResolveTestSuite) TestReportResolve2() { testToken := suite.testTokens["admin_account"] testUser := suite.testUsers["admin_account"] testReportID := suite.testReports["local_account_2_report_remote_account_1"].ID - var actionTakenComment *string = testrig.StringPtr("no action was taken, this is a frivolous report you boob") + var actionTakenComment *string = util.Ptr("no action was taken, this is a frivolous report you boob") report, err := suite.resolveReport(testAccount, testToken, testUser, testReportID, http.StatusOK, "", actionTakenComment) suite.NoError(err) diff --git a/internal/api/client/admin/reportsget_test.go b/internal/api/client/admin/reportsget_test.go index 4f29aa872..943e9711a 100644 --- a/internal/api/client/admin/reportsget_test.go +++ b/internal/api/client/admin/reportsget_test.go @@ -32,6 +32,7 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/gtserror" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" "github.com/superseriousbusiness/gotosocial/internal/oauth" + "github.com/superseriousbusiness/gotosocial/internal/util" "github.com/superseriousbusiness/gotosocial/testrig" ) @@ -963,7 +964,7 @@ func (suite *ReportsGetTestSuite) TestReportsGetResolvedTargetAccount() { testAccount := suite.testAccounts["admin_account"] testToken := suite.testTokens["admin_account"] testUser := suite.testUsers["admin_account"] - resolved := testrig.FalseBool() + resolved := util.Ptr(false) targetAccount := suite.testAccounts["local_account_2"] reports, link, err := suite.getReports(testAccount, testToken, testUser, http.StatusOK, "", resolved, "", targetAccount.ID, "", "", "", 20) -- cgit v1.2.3