1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.Metadata.UtilsTest do
6 use Pleroma.DataCase, async: true
8 alias Pleroma.Web.Metadata.Utils
10 describe "scrub_html_and_truncate/1" do
11 test "it returns text without encode HTML" do
17 "actor" => user.ap_id,
18 "id" => "https://pleroma.gov/objects/whatever",
19 "content" => "Pleroma's really cool!"
23 assert Utils.scrub_html_and_truncate(note) == "Pleroma's really cool!"
27 describe "scrub_html_and_truncate/2" do
28 test "it returns text without encode HTML" do
29 assert Utils.scrub_html_and_truncate("Pleroma's really cool!") == "Pleroma's really cool!"