Merge branch 'develop' into issue/1276
This commit is contained in:
commit
b87533760b
96 changed files with 1659 additions and 445 deletions
|
|
@ -368,10 +368,10 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
|
|||
assert result.pleroma[:settings_store] == nil
|
||||
end
|
||||
|
||||
test "sanitizes display names" do
|
||||
test "doesn't sanitize display names" do
|
||||
user = insert(:user, name: "<marquee> username </marquee>")
|
||||
result = AccountView.render("show.json", %{user: user})
|
||||
refute result.display_name == "<marquee> username </marquee>"
|
||||
assert result.display_name == "<marquee> username </marquee>"
|
||||
end
|
||||
|
||||
test "never display nil user follow counts" do
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationViewTest do
|
|||
NotificationView.render("index.json", %{notifications: [notification], for: follower})
|
||||
end
|
||||
|
||||
test "EmojiReaction notification" do
|
||||
test "EmojiReact notification" do
|
||||
user = insert(:user)
|
||||
other_user = insert(:user)
|
||||
|
||||
|
|
|
|||
|
|
@ -37,8 +37,15 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
|
|||
status = StatusView.render("show.json", activity: activity)
|
||||
|
||||
assert status[:pleroma][:emoji_reactions] == [
|
||||
%{emoji: "☕", count: 2},
|
||||
%{emoji: "🍵", count: 1}
|
||||
%{emoji: "☕", count: 2, reacted: false},
|
||||
%{emoji: "🍵", count: 1, reacted: false}
|
||||
]
|
||||
|
||||
status = StatusView.render("show.json", activity: activity, for: user)
|
||||
|
||||
assert status[:pleroma][:emoji_reactions] == [
|
||||
%{emoji: "☕", count: 2, reacted: true},
|
||||
%{emoji: "🍵", count: 1, reacted: false}
|
||||
]
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue