forked from AkkomaGang/akkoma
sync bio sanitization code in tests
This commit is contained in:
parent
1495d04789
commit
f533daffdb
1 changed files with 8 additions and 8 deletions
|
@ -65,8 +65,8 @@ test "A user" do
|
||||||
"name" => user.name,
|
"name" => user.name,
|
||||||
"screen_name" => user.nickname,
|
"screen_name" => user.nickname,
|
||||||
"name_html" => user.name,
|
"name_html" => user.name,
|
||||||
"description" => HtmlSanitizeEx.strip_tags(user.bio),
|
"description" => HtmlSanitizeEx.strip_tags(user.bio |> String.replace("<br>", "\n")),
|
||||||
"description_html" => HtmlSanitizeEx.strip_tags(user.bio),
|
"description_html" => HtmlSanitizeEx.basic_html(user.bio),
|
||||||
"created_at" => user.inserted_at |> Utils.format_naive_asctime(),
|
"created_at" => user.inserted_at |> Utils.format_naive_asctime(),
|
||||||
"favourites_count" => 0,
|
"favourites_count" => 0,
|
||||||
"statuses_count" => 1,
|
"statuses_count" => 1,
|
||||||
|
@ -104,8 +104,8 @@ test "A user for a given other follower", %{user: user} do
|
||||||
"name" => user.name,
|
"name" => user.name,
|
||||||
"screen_name" => user.nickname,
|
"screen_name" => user.nickname,
|
||||||
"name_html" => user.name,
|
"name_html" => user.name,
|
||||||
"description" => HtmlSanitizeEx.strip_tags(user.bio),
|
"description" => HtmlSanitizeEx.strip_tags(user.bio |> String.replace("<br>", "\n")),
|
||||||
"description_html" => HtmlSanitizeEx.strip_tags(user.bio),
|
"description_html" => HtmlSanitizeEx.basic_html(user.bio),
|
||||||
"created_at" => user.inserted_at |> Utils.format_naive_asctime(),
|
"created_at" => user.inserted_at |> Utils.format_naive_asctime(),
|
||||||
"favourites_count" => 0,
|
"favourites_count" => 0,
|
||||||
"statuses_count" => 0,
|
"statuses_count" => 0,
|
||||||
|
@ -144,8 +144,8 @@ test "A user that follows you", %{user: user} do
|
||||||
"name" => follower.name,
|
"name" => follower.name,
|
||||||
"screen_name" => follower.nickname,
|
"screen_name" => follower.nickname,
|
||||||
"name_html" => follower.name,
|
"name_html" => follower.name,
|
||||||
"description" => HtmlSanitizeEx.strip_tags(follower.bio),
|
"description" => HtmlSanitizeEx.strip_tags(user.bio |> String.replace("<br>", "\n")),
|
||||||
"description_html" => HtmlSanitizeEx.strip_tags(follower.bio),
|
"description_html" => HtmlSanitizeEx.basic_html(user.bio),
|
||||||
"created_at" => follower.inserted_at |> Utils.format_naive_asctime(),
|
"created_at" => follower.inserted_at |> Utils.format_naive_asctime(),
|
||||||
"favourites_count" => 0,
|
"favourites_count" => 0,
|
||||||
"statuses_count" => 0,
|
"statuses_count" => 0,
|
||||||
|
@ -191,8 +191,8 @@ test "A blocked user for the blocker" do
|
||||||
"name" => user.name,
|
"name" => user.name,
|
||||||
"screen_name" => user.nickname,
|
"screen_name" => user.nickname,
|
||||||
"name_html" => user.name,
|
"name_html" => user.name,
|
||||||
"description" => HtmlSanitizeEx.strip_tags(user.bio),
|
"description" => HtmlSanitizeEx.strip_tags(user.bio |> String.replace("<br>", "\n")),
|
||||||
"description_html" => HtmlSanitizeEx.strip_tags(user.bio),
|
"description_html" => HtmlSanitizeEx.basic_html(user.bio),
|
||||||
"created_at" => user.inserted_at |> Utils.format_naive_asctime(),
|
"created_at" => user.inserted_at |> Utils.format_naive_asctime(),
|
||||||
"favourites_count" => 0,
|
"favourites_count" => 0,
|
||||||
"statuses_count" => 0,
|
"statuses_count" => 0,
|
||||||
|
|
Loading…
Reference in a new issue