total rebase
[anni] / test / pleroma / web / mastodon_api / views / poll_view_test.exs
old mode 100755 (executable)
new mode 100644 (file)
index a73d862..3aa73c2
@@ -43,7 +43,8 @@ defmodule Pleroma.Web.MastodonAPI.PollViewTest do
         %{title: "why are you even asking?", votes_count: 0}
       ],
       votes_count: 0,
-      voters_count: 0
+      voters_count: 0,
+      pleroma: %{non_anonymous: false}
     }
 
     result = PollView.render("show.json", %{object: object})
@@ -165,4 +166,11 @@ defmodule Pleroma.Web.MastodonAPI.PollViewTest do
              ]
            } = PollView.render("show.json", %{object: object})
   end
+
+  test "that poll is non anonymous" do
+    object = Object.normalize("https://friends.grishka.me/posts/54642", fetch: true)
+    result = PollView.render("show.json", %{object: object})
+
+    assert result[:pleroma][:non_anonymous] == true
+  end
 end