summaryrefslogtreecommitdiff
path: root/internal/typeutils/wrap_test.go
diff options
context:
space:
mode:
authorLibravatar Daenney <git@noreply.sourcery.dny.nu>2025-05-22 12:26:11 +0200
committerLibravatar kim <gruf@noreply.codeberg.org>2025-05-22 12:26:11 +0200
commitd5c9c4adc167cdb05e73f5105702cf340293e61c (patch)
tree1d21fe376099864900837eba675a965517f98e5d /internal/typeutils/wrap_test.go
parent[feature] Allow exposing allows, implement `/api/v1/domain_blocks` and `/api/... (diff)
downloadgotosocial-d5c9c4adc167cdb05e73f5105702cf340293e61c.tar.xz
[chore] Upgrade to Go 1.24 (#4187)
* Set `go.mod` to 1.24 now that it's been out for 3 months. * Update all the test to use `testing.T.Context()`. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4187 Co-authored-by: Daenney <git@noreply.sourcery.dny.nu> Co-committed-by: Daenney <git@noreply.sourcery.dny.nu>
Diffstat (limited to 'internal/typeutils/wrap_test.go')
-rw-r--r--internal/typeutils/wrap_test.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/typeutils/wrap_test.go b/internal/typeutils/wrap_test.go
index ae68d98c8..48a28e3b0 100644
--- a/internal/typeutils/wrap_test.go
+++ b/internal/typeutils/wrap_test.go
@@ -18,7 +18,6 @@
package typeutils_test
import (
- "context"
"encoding/json"
"testing"
@@ -34,7 +33,7 @@ type WrapTestSuite struct {
func (suite *WrapTestSuite) TestWrapNoteInCreateIRIOnly() {
testStatus := suite.testStatuses["local_account_1_status_1"]
- note, err := suite.typeconverter.StatusToAS(context.Background(), testStatus)
+ note, err := suite.typeconverter.StatusToAS(suite.T().Context(), testStatus)
suite.NoError(err)
create := typeutils.WrapStatusableInCreate(note, true)
@@ -62,7 +61,7 @@ func (suite *WrapTestSuite) TestWrapNoteInCreateIRIOnly() {
func (suite *WrapTestSuite) TestWrapNoteInCreate() {
testStatus := suite.testStatuses["local_account_1_status_1"]
- note, err := suite.typeconverter.StatusToAS(context.Background(), testStatus)
+ note, err := suite.typeconverter.StatusToAS(suite.T().Context(), testStatus)
suite.NoError(err)
create := typeutils.WrapStatusableInCreate(note, false)
@@ -154,7 +153,7 @@ func (suite *WrapTestSuite) TestWrapNoteInCreate() {
func (suite *WrapTestSuite) TestWrapAccountableInUpdate() {
testAccount := suite.testAccounts["local_account_1"]
- accountable, err := suite.typeconverter.AccountToAS(context.Background(), testAccount)
+ accountable, err := suite.typeconverter.AccountToAS(suite.T().Context(), testAccount)
if err != nil {
suite.FailNow(err.Error())
}