summaryrefslogtreecommitdiff
path: root/testrig
diff options
context:
space:
mode:
Diffstat (limited to 'testrig')
-rw-r--r--testrig/federator.go2
-rw-r--r--testrig/testmodels.go20
2 files changed, 21 insertions, 1 deletions
diff --git a/testrig/federator.go b/testrig/federator.go
index 38ba487a9..23d780806 100644
--- a/testrig/federator.go
+++ b/testrig/federator.go
@@ -26,5 +26,5 @@ import (
// NewTestFederator returns a federator with the given database and (mock!!) transport controller.
func NewTestFederator(state *state.State, tc transport.Controller, mediaManager media.Manager) federation.Federator {
- return federation.NewFederator(state.DB, NewTestFederatingDB(state), tc, NewTestTypeConverter(state.DB), mediaManager)
+ return federation.NewFederator(state, NewTestFederatingDB(state), tc, NewTestTypeConverter(state.DB), mediaManager)
}
diff --git a/testrig/testmodels.go b/testrig/testmodels.go
index 60c4b919a..6337004ff 100644
--- a/testrig/testmodels.go
+++ b/testrig/testmodels.go
@@ -2482,6 +2482,26 @@ func NewTestFediStatuses() map[string]vocab.ActivityStreamsNote {
),
},
),
+ "http://fossbros-anonymous.io/users/foss_satan/statuses/106221634728637552": NewAPNote(
+ URLMustParse("http://fossbros-anonymous.io/users/foss_satan/statuses/106221634728637552"),
+ URLMustParse("http://fossbros-anonymous.io/@foss_satan/106221634728637552"),
+ TimeMustParse("2022-07-13T12:13:12+02:00"),
+ `<p><span class="h-card"><a href="http://localhost:8080/@the_mighty_zork" class="u-url mention">@<span>the_mighty_zork</span></a></span> nice there it is:</p><p><a href="http://localhost:8080/users/the_mighty_zork/statuses/01F8MHAMCHF6Y650WCRSCP4WMY/activity" rel="nofollow noopener noreferrer" target="_blank"><span class="invisible">https://</span><span class="ellipsis">social.pixie.town/users/f0x/st</span><span class="invisible">atuses/106221628567855262/activity</span></a></p>`,
+ "",
+ URLMustParse("http://fossbros-anonymous.io/users/foss_satan"),
+ []*url.URL{
+ URLMustParse(pub.PublicActivityPubIRI),
+ },
+ []*url.URL{},
+ false,
+ []vocab.ActivityStreamsMention{
+ newAPMention(
+ URLMustParse("http://localhost:8080/users/the_mighty_zork"),
+ "@the_mighty_zork@localhost:8080",
+ ),
+ },
+ nil,
+ ),
}
}