summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/views
diff options
context:
space:
mode:
authorkaniini <ariadne@dereferenced.org>2019-10-18 16:04:57 +0000
committerkaniini <ariadne@dereferenced.org>2019-10-18 16:04:57 +0000
commit4053a82f41691195d1b29cc9eb3f6ed6814ee12f (patch)
tree31075bdd659c45b688e3b670acc5c9b41a7abc63 /test/web/mastodon_api/views
parent223c0c0136be81a363b114538948e8e0317540af (diff)
parentc2ae6310dc09e65515c7b8774d2b85b5ef7da1a1 (diff)
downloadpleroma-4053a82f41691195d1b29cc9eb3f6ed6814ee12f.tar.gz
pleroma-4053a82f41691195d1b29cc9eb3f6ed6814ee12f.zip
Merge branch 'feature/ostatus-removal' into 'develop'
ostatus removal Closes #1145 See merge request pleroma/pleroma!1854
Diffstat (limited to 'test/web/mastodon_api/views')
-rw-r--r--test/web/mastodon_api/views/status_view_test.exs11
1 files changed, 4 insertions, 7 deletions
diff --git a/test/web/mastodon_api/views/status_view_test.exs b/test/web/mastodon_api/views/status_view_test.exs
index 1d5a6e956..c200ad8fe 100644
--- a/test/web/mastodon_api/views/status_view_test.exs
+++ b/test/web/mastodon_api/views/status_view_test.exs
@@ -14,7 +14,6 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
alias Pleroma.Web.CommonAPI.Utils
alias Pleroma.Web.MastodonAPI.AccountView
alias Pleroma.Web.MastodonAPI.StatusView
- alias Pleroma.Web.OStatus
import Pleroma.Factory
import Tesla.Mock
@@ -230,17 +229,15 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
end
test "contains mentions" do
- incoming = File.read!("test/fixtures/incoming_reply_mastodon.xml")
- # a user with this ap id might be in the cache.
- recipient = "https://pleroma.soykaf.com/users/lain"
- user = insert(:user, %{ap_id: recipient})
+ user = insert(:user)
+ mentioned = insert(:user)
- {:ok, [activity]} = OStatus.handle_incoming(incoming)
+ {:ok, activity} = CommonAPI.post(user, %{"status" => "hi @#{mentioned.nickname}"})
status = StatusView.render("show.json", %{activity: activity})
assert status.mentions ==
- Enum.map([user], fn u -> AccountView.render("mention.json", %{user: u}) end)
+ Enum.map([mentioned], fn u -> AccountView.render("mention.json", %{user: u}) end)
end
test "create mentions from the 'to' field" do