Commit bd03644c authored by kaniini's avatar kaniini
Browse files

test: add tests for new User.html_filter_policy()

parent df00a364
Pipeline #3819 passed with stages
in 6 minutes and 55 seconds
......@@ -526,4 +526,18 @@ test "insert or update a user from given data" do
assert {:ok, %User{}} = User.insert_or_update_user(data)
describe "per-user rich-text filtering" do
test "html_filter_policy returns nil when rich-text is enabled" do
user = insert(:user)
assert nil == User.html_filter_policy(user)
test "html_filter_policy returns TwitterText scrubber when rich-text is disabled" do
user = insert(:user, %{info: %{"no_rich_text" => true}})
assert Pleroma.HTML.Scrubber.TwitterText == User.html_filter_policy(user)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment