summaryrefslogtreecommitdiff
path: root/internal/ap/ap_test.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2025-01-23 17:18:23 +0000
committerLibravatar GitHub <noreply@github.com>2025-01-23 18:18:23 +0100
commit9333bbc4d0d5ae46c72fca1f5b1aacb3c0a7653e (patch)
treee7ccd1dc3abff5386e0b86e6baf659c9aa3b55a5 /internal/ap/ap_test.go
parent[feature] Add warning about `trusted-proxies` to make config easier (#3675) (diff)
downloadgotosocial-9333bbc4d0d5ae46c72fca1f5b1aacb3c0a7653e.tar.xz
[feature] Serve bot accounts over AP as Service instead of Person (#3672)
* pepis * oopsie doopsie * bollocks
Diffstat (limited to 'internal/ap/ap_test.go')
-rw-r--r--internal/ap/ap_test.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/internal/ap/ap_test.go b/internal/ap/ap_test.go
index f982e4443..3738c8c9c 100644
--- a/internal/ap/ap_test.go
+++ b/internal/ap/ap_test.go
@@ -24,7 +24,6 @@ import (
"io"
"github.com/stretchr/testify/suite"
- "github.com/superseriousbusiness/activity/pub"
"github.com/superseriousbusiness/activity/streams"
"github.com/superseriousbusiness/activity/streams/vocab"
"github.com/superseriousbusiness/gotosocial/internal/ap"
@@ -111,7 +110,7 @@ func noteWithMentions1() vocab.ActivityStreamsNote {
// Anyone can like.
canLikeAlwaysProp := streams.NewGoToSocialAlwaysProperty()
- canLikeAlwaysProp.AppendIRI(testrig.URLMustParse(pub.PublicActivityPubIRI))
+ canLikeAlwaysProp.AppendIRI(ap.PublicURI())
canLike.SetGoToSocialAlways(canLikeAlwaysProp)
// Empty approvalRequired.
@@ -128,7 +127,7 @@ func noteWithMentions1() vocab.ActivityStreamsNote {
// Anyone can reply.
canReplyAlwaysProp := streams.NewGoToSocialAlwaysProperty()
- canReplyAlwaysProp.AppendIRI(testrig.URLMustParse(pub.PublicActivityPubIRI))
+ canReplyAlwaysProp.AppendIRI(ap.PublicURI())
canReply.SetGoToSocialAlways(canReplyAlwaysProp)
// Set empty approvalRequired.
@@ -151,7 +150,7 @@ func noteWithMentions1() vocab.ActivityStreamsNote {
// Public requires approval to announce.
canAnnounceApprovalRequiredProp := streams.NewGoToSocialApprovalRequiredProperty()
- canAnnounceApprovalRequiredProp.AppendIRI(testrig.URLMustParse(pub.PublicActivityPubIRI))
+ canAnnounceApprovalRequiredProp.AppendIRI(ap.PublicURI())
canAnnounce.SetGoToSocialApprovalRequired(canAnnounceApprovalRequiredProp)
// Set canAnnounce on the policy.
@@ -266,7 +265,7 @@ func addressable1() ap.Addressable {
note := streams.NewActivityStreamsNote()
toProp := streams.NewActivityStreamsToProperty()
- toProp.AppendIRI(testrig.URLMustParse(pub.PublicActivityPubIRI))
+ toProp.AppendIRI(ap.PublicURI())
note.SetActivityStreamsTo(toProp)
@@ -288,7 +287,7 @@ func addressable2() ap.Addressable {
note.SetActivityStreamsTo(toProp)
ccProp := streams.NewActivityStreamsCcProperty()
- ccProp.AppendIRI(testrig.URLMustParse(pub.PublicActivityPubIRI))
+ ccProp.AppendIRI(ap.PublicURI())
note.SetActivityStreamsCc(ccProp)