diff options
author | 2023-08-07 19:38:11 +0200 | |
---|---|---|
committer | 2023-08-07 18:38:11 +0100 | |
commit | be3718f6e4c7bb229f9eb78b44c52d14399977cc (patch) | |
tree | a0efc132fbfb806227cc4b9af8bac9f5a5775c1c /internal/api/client/admin | |
parent | [chore]: Bump github.com/tdewolff/minify/v2 from 2.12.7 to 2.12.8 (#2073) (diff) | |
download | gotosocial-be3718f6e4c7bb229f9eb78b44c52d14399977cc.tar.xz |
[chore] Use generic pointer function (#2080)
This replaces the different $TypePtr functions with a generic
implementation.
Diffstat (limited to 'internal/api/client/admin')
-rw-r--r-- | internal/api/client/admin/reportresolve_test.go | 2 | ||||
-rw-r--r-- | internal/api/client/admin/reportsget_test.go | 3 |
2 files changed, 3 insertions, 2 deletions
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) |