X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Fpleroma%2Fweb%2Fmastodon_api%2Fviews%2Fpoll_view_test.exs;h=224b26cb91db1593dd1c16e3c778fc8ece10b4df;hb=1b49b8efe57256b3f64b4b7e8a1de805ab030814;hp=a8600e1c28f6eb10d09293975833c2645c5d9a0c;hpb=f917285b72dbc770be40478e1a55973f29d5db7d;p=akkoma diff --git a/test/pleroma/web/mastodon_api/views/poll_view_test.exs b/test/pleroma/web/mastodon_api/views/poll_view_test.exs index a8600e1c2..224b26cb9 100644 --- a/test/pleroma/web/mastodon_api/views/poll_view_test.exs +++ b/test/pleroma/web/mastodon_api/views/poll_view_test.exs @@ -42,7 +42,6 @@ defmodule Pleroma.Web.MastodonAPI.PollViewTest do %{title: "yes", votes_count: 0}, %{title: "why are you even asking?", votes_count: 0} ], - voted: false, votes_count: 0, voters_count: 0 } @@ -124,6 +123,8 @@ defmodule Pleroma.Web.MastodonAPI.PollViewTest do result = PollView.render("show.json", %{object: object, for: other_user}) assert result[:voted] == true + assert 1 in result[:own_votes] + assert 2 in result[:own_votes] assert Enum.at(result[:options], 1)[:votes_count] == 1 assert Enum.at(result[:options], 2)[:votes_count] == 1 end