# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
note: "valid html",
sensitive: false,
pleroma: %{
+ actor_type: "Person",
discoverable: false
},
fields: []
insert(:user, %{
follower_count: 3,
note_count: 5,
- source_data: %{"type" => "Service"},
+ source_data: %{},
+ actor_type: "Service",
nickname: "shp@shitposter.club",
inserted_at: ~N[2017-08-15 15:47:06.597036]
})
note: user.bio,
sensitive: false,
pleroma: %{
+ actor_type: "Service",
discoverable: false
},
fields: []
insert(:user, %{
follower_count: 0,
note_count: 5,
- source_data: %{"type" => "Service"},
+ source_data: %{},
+ actor_type: "Service",
nickname: "shp@shitposter.club",
inserted_at: ~N[2017-08-15 15:47:06.597036]
})
note: user.bio,
sensitive: false,
pleroma: %{
+ actor_type: "Service",
discoverable: false
},
fields: []
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