forked from AkkomaGang/akkoma
tests: mastodon api: fix broken test that used OStatus
This commit is contained in:
parent
44e64af5e7
commit
c2ae6310dc
1 changed files with 11 additions and 14 deletions
|
@ -228,20 +228,17 @@ test "a reply" do
|
||||||
assert status.in_reply_to_id == to_string(note.id)
|
assert status.in_reply_to_id == to_string(note.id)
|
||||||
end
|
end
|
||||||
|
|
||||||
# XXX: fix this test
|
test "contains mentions" do
|
||||||
# test "contains mentions" do
|
user = insert(:user)
|
||||||
# incoming = File.read!("test/fixtures/incoming_reply_mastodon.xml")
|
mentioned = insert(:user)
|
||||||
# # a user with this ap id might be in the cache.
|
|
||||||
# recipient = "https://pleroma.soykaf.com/users/lain"
|
{:ok, activity} = CommonAPI.post(user, %{"status" => "hi @#{mentioned.nickname}"})
|
||||||
# user = insert(:user, %{ap_id: recipient})
|
|
||||||
#
|
status = StatusView.render("show.json", %{activity: activity})
|
||||||
# {:ok, [activity]} = OStatus.handle_incoming(incoming)
|
|
||||||
#
|
assert status.mentions ==
|
||||||
# status = StatusView.render("show.json", %{activity: activity})
|
Enum.map([mentioned], fn u -> AccountView.render("mention.json", %{user: u}) end)
|
||||||
#
|
end
|
||||||
# assert status.mentions ==
|
|
||||||
# Enum.map([user], fn u -> AccountView.render("mention.json", %{user: u}) end)
|
|
||||||
# end
|
|
||||||
|
|
||||||
test "create mentions from the 'to' field" do
|
test "create mentions from the 'to' field" do
|
||||||
%User{ap_id: recipient_ap_id} = insert(:user)
|
%User{ap_id: recipient_ap_id} = insert(:user)
|
||||||
|
|
Loading…
Reference in a new issue