summaryrefslogtreecommitdiff
path: root/internal/typeutils/converter_test.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-05-27 16:35:35 +0200
committerLibravatar GitHub <noreply@github.com>2022-05-27 16:35:35 +0200
commitdc8cc7e364de3342c84c2329da6a0addfcbba273 (patch)
tree2645e28ba4ba97014582075c577b011dafb79c16 /internal/typeutils/converter_test.go
parent[performance] Don't retry/backoff invalid http requests that will never succe... (diff)
downloadgotosocial-dc8cc7e364de3342c84c2329da6a0addfcbba273.tar.xz
[chore] Add test for dereferencing Owncast service account (#613)
Diffstat (limited to 'internal/typeutils/converter_test.go')
-rw-r--r--internal/typeutils/converter_test.go51
1 files changed, 51 insertions, 0 deletions
diff --git a/internal/typeutils/converter_test.go b/internal/typeutils/converter_test.go
index 4d782c822..0983669ac 100644
--- a/internal/typeutils/converter_test.go
+++ b/internal/typeutils/converter_test.go
@@ -414,6 +414,57 @@ const (
}
}
`
+ owncastService = `
+ {
+ "@context": [
+ "https://www.w3.org/ns/activitystreams",
+ "http://joinmastodon.org/ns",
+ "https://w3id.org/security/v1"
+ ],
+ "attachment": {
+ "name": "Stream",
+ "type": "PropertyValue",
+ "value": "<a href=\"https://owncast.example.org\" rel=\"me nofollow noopener noreferrer\" target=\"_blank\">https://owncast.example.org</a>"
+ },
+ "discoverable": true,
+ "followers": "https://owncast.example.org/federation/user/rgh/followers",
+ "icon": {
+ "type": "Image",
+ "url": "https://owncast.example.org/logo/external"
+ },
+ "id": "https://owncast.example.org/federation/user/rgh",
+ "image": {
+ "type": "Image",
+ "url": "https://owncast.example.org/logo/external"
+ },
+ "inbox": "https://owncast.example.org/federation/user/rgh/inbox",
+ "manuallyApprovesFollowers": false,
+ "name": "Rob's Owncast Server",
+ "outbox": "https://owncast.example.org/federation/user/rgh/outbox",
+ "preferredUsername": "rgh",
+ "publicKey": {
+ "id": "https://owncast.example.org/federation/user/rgh#main-key",
+ "owner": "https://owncast.example.org/federation/user/rgh",
+ "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAurN+lUNwcGV2poLNtaoT\naRtJzN6s4SDcBmIFk82lxhdMKC6/Nssm+hvDuxWGqL0+dHwSvrG11rA6irGuSzRk\niHjYyVwYe/p1CxqJxzUfZVJAWdsCFWy+HtDrTWs5sggj1MiL59uGxvkCep+OYBuG\nBI8CvSOMLrDp8soCg3EY+zSgpXtGMuRaaUukavsfuglApShB61ny7W8LG252iKC5\nmyO8L7l8TNa5BrIi/pRHLzvv9aWiCa8VKtvmqj+mClEhpkRhImSk5GPJXgouTTgl\ntT28NYYciSf9YYgZ0SNWHdLUCdkMF592j4+BbkPvdgzc70G4yyu2GcWnTzBuvF5X\nYwIDAQAB\n-----END PUBLIC KEY-----\n"
+ },
+ "published": "2022-05-22T18:44:57Z",
+ "summary": "linux audio stuff ",
+ "tag": [
+ {
+ "href": "https://directory.owncast.online/tags/owncast",
+ "name": "#owncast",
+ "type": "Hashtag"
+ },
+ {
+ "href": "https://directory.owncast.online/tags/streaming",
+ "name": "#streaming",
+ "type": "Hashtag"
+ }
+ ],
+ "type": "Service",
+ "url": "https://owncast.example.org/federation/user/rgh"
+ }
+`
)
type TypeUtilsTestSuite struct {