summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/views
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-06-19 14:56:50 +0200
committerlain <lain@soykaf.club>2020-06-19 14:56:50 +0200
commit7e488cd4a7ac038dfe8a1f5b204cb134bb5ba549 (patch)
treea35a08cb24761e72c4be20b97a1833fdb26ca682 /test/web/mastodon_api/views
parent015f9258a9bd1430ab079f449b118b664c3b9664 (diff)
parentd772361e6209e6b5733e9fe52b3671cd222060b3 (diff)
downloadpleroma-7e488cd4a7ac038dfe8a1f5b204cb134bb5ba549.tar.gz
pleroma-7e488cd4a7ac038dfe8a1f5b204cb134bb5ba549.zip
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into update-validator
Diffstat (limited to 'test/web/mastodon_api/views')
-rw-r--r--test/web/mastodon_api/views/account_view_test.exs3
-rw-r--r--test/web/mastodon_api/views/conversation_view_test.exs11
2 files changed, 12 insertions, 2 deletions
diff --git a/test/web/mastodon_api/views/account_view_test.exs b/test/web/mastodon_api/views/account_view_test.exs
index 044f088a4..80b1f734c 100644
--- a/test/web/mastodon_api/views/account_view_test.exs
+++ b/test/web/mastodon_api/views/account_view_test.exs
@@ -33,7 +33,8 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
bio:
"<script src=\"invalid-html\"></script><span>valid html</span>. a<br>b<br/>c<br >d<br />f '&<>\"",
inserted_at: ~N[2017-08-15 15:47:06.597036],
- emoji: %{"karjalanpiirakka" => "/file.png"}
+ emoji: %{"karjalanpiirakka" => "/file.png"},
+ raw_bio: "valid html. a\nb\nc\nd\nf '&<>\""
})
expected = %{
diff --git a/test/web/mastodon_api/views/conversation_view_test.exs b/test/web/mastodon_api/views/conversation_view_test.exs
index 6f84366f8..2e8203c9b 100644
--- a/test/web/mastodon_api/views/conversation_view_test.exs
+++ b/test/web/mastodon_api/views/conversation_view_test.exs
@@ -15,8 +15,17 @@ defmodule Pleroma.Web.MastodonAPI.ConversationViewTest do
user = insert(:user)
other_user = insert(:user)
+ {:ok, parent} = CommonAPI.post(user, %{status: "parent"})
+
{:ok, activity} =
- CommonAPI.post(user, %{status: "hey @#{other_user.nickname}", visibility: "direct"})
+ CommonAPI.post(user, %{
+ status: "hey @#{other_user.nickname}",
+ visibility: "direct",
+ in_reply_to_id: parent.id
+ })
+
+ {:ok, _reply_activity} =
+ CommonAPI.post(user, %{status: "hu", visibility: "public", in_reply_to_id: parent.id})
[participation] = Participation.for_user_with_last_activity_id(user)