diff options
author | 2024-08-26 19:17:45 +0200 | |
---|---|---|
committer | 2024-08-26 19:17:45 +0200 | |
commit | 8a34e4c28f5d87938970e4416e771bc5b9a2e2f6 (patch) | |
tree | 50d422e4464b01219e30da7e4f8952f922d2b8dc /internal/typeutils/wrap_test.go | |
parent | move WASM compilation stage much later in server init to reduce memory usage ... (diff) | |
download | gotosocial-8a34e4c28f5d87938970e4416e771bc5b9a2e2f6.tar.xz |
[bugfix] Fix incorrect json-ld `@context` serialization (#3243)
Diffstat (limited to 'internal/typeutils/wrap_test.go')
-rw-r--r-- | internal/typeutils/wrap_test.go | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/internal/typeutils/wrap_test.go b/internal/typeutils/wrap_test.go index 833b18bac..1085c8c66 100644 --- a/internal/typeutils/wrap_test.go +++ b/internal/typeutils/wrap_test.go @@ -72,14 +72,17 @@ func (suite *WrapTestSuite) TestWrapNoteInCreate() { createI, err := ap.Serialize(create) suite.NoError(err) - // Chop off @context since - // ordering is non-determinate. - delete(createI, "@context") - bytes, err := json.MarshalIndent(createI, "", " ") suite.NoError(err) suite.Equal(`{ + "@context": [ + "https://gotosocial.org/ns", + "https://www.w3.org/ns/activitystreams", + { + "sensitive": "as:sensitive" + } + ], "actor": "http://localhost:8080/users/the_mighty_zork", "cc": "http://localhost:8080/users/the_mighty_zork/followers", "id": "http://localhost:8080/users/the_mighty_zork/statuses/01F8MHAMCHF6Y650WCRSCP4WMY/activity#Create", |