X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Fweb%2Fmastodon_api%2Fviews%2Fpoll_view_test.exs;h=b7e2f17eff9faf85af39ba109f1ff0bc964d493e;hb=19c108170edb2d72d52c56d82475b565e6fd6b36;hp=76672f36c79bdf1f928b791d0b70ecfc049a9cbc;hpb=156c8a508846bd6d4e55f666c4ecc6f0129ac5fc;p=akkoma
diff --git a/test/web/mastodon_api/views/poll_view_test.exs b/test/web/mastodon_api/views/poll_view_test.exs
index 76672f36c..b7e2f17ef 100644
--- a/test/web/mastodon_api/views/poll_view_test.exs
+++ b/test/web/mastodon_api/views/poll_view_test.exs
@@ -135,4 +135,33 @@ defmodule Pleroma.Web.MastodonAPI.PollViewTest do
assert result[:expires_at] == nil
assert result[:expired] == false
end
+
+ test "doesn't strips HTML tags" do
+ user = insert(:user)
+
+ {:ok, activity} =
+ CommonAPI.post(user, %{
+ status: "What's with the smug face?",
+ poll: %{
+ options: [
+ "",
+ "",
+ "",
+ ""
+ ],
+ expires_in: 20
+ }
+ })
+
+ object = Object.normalize(activity)
+
+ assert %{
+ options: [
+ %{title: "", votes_count: 0},
+ %{title: "", votes_count: 0},
+ %{title: "", votes_count: 0},
+ %{title: "", votes_count: 0}
+ ]
+ } = PollView.render("show.json", %{object: object})
+ end
end