# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
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
}
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