+ {text, mentions, []} = Formatter.linkify(text)
+
+ assert length(mentions) == 3
+
+ expected_text =
+ "<span class='h-card'><a data-user='#{gsimg.id}' class='u-url mention' href='#{
+ gsimg.ap_id
+ }'>@<span>gsimg</span></a></span> According to <span class='h-card'><a data-user='#{
+ archaeme.id
+ }' class='u-url mention' href='#{"https://archeme/@archa_eme_"}'>@<span>archa_eme_</span></a></span>, that is @daggsy. Also hello <span class='h-card'><a data-user='#{
+ archaeme_remote.id
+ }' class='u-url mention' href='#{archaeme_remote.ap_id}'>@<span>archaeme</span></a></span>"
+
+ assert expected_text == text
+ end
+
+ test "gives a replacement for user links when the user is using Osada" do
+ {:ok, mike} = User.get_or_fetch("mike@osada.macgirvin.com")
+
+ text = "@mike@osada.macgirvin.com test"