From 8a67677d7791287905898bc388fbd8d9c81ec2b1 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Tue, 18 Dec 2018 22:10:56 +0300 Subject: [PATCH] Add test --- test/formatter_test.exs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/formatter_test.exs b/test/formatter_test.exs index bb318b7d5..cfa735795 100644 --- a/test/formatter_test.exs +++ b/test/formatter_test.exs @@ -22,6 +22,18 @@ defmodule Pleroma.FormatterTest do assert expected_text == Formatter.add_hashtag_links({[], text}, tags) |> Formatter.finalize() end + + test "does not turn html characters to tags" do + text = "Fact #3: pleroma does what mastodon't" + + expected_text = + "Fact #3: pleroma does what mastodon't" + + tags = Formatter.parse_tags(text) + + assert expected_text == + Formatter.add_hashtag_links({[], text}, tags) |> Formatter.finalize() + end end describe ".add_links" do -- 2.45.2