projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Downgrade Plug to 1.10.x, revert upload_limit tuple to function change
[akkoma]
/
test
/
pleroma
/
web
/
mastodon_api
/
views
/
poll_view_test.exs
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 f83e5b368f796d9df2128d31600946f54ded257d..224b26cb91db1593dd1c16e3c778fc8ece10b4df 100644
(file)
--- a/
test/pleroma/web/mastodon_api/views/poll_view_test.exs
+++ b/
test/pleroma/web/mastodon_api/views/poll_view_test.exs
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-202
0
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-202
1
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.MastodonAPI.PollViewTest do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.MastodonAPI.PollViewTest do
@@
-42,7
+42,6
@@
defmodule Pleroma.Web.MastodonAPI.PollViewTest do
%{title: "yes", votes_count: 0},
%{title: "why are you even asking?", votes_count: 0}
],
%{title: "yes", votes_count: 0},
%{title: "why are you even asking?", votes_count: 0}
],
- voted: false,
votes_count: 0,
voters_count: 0
}
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
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
assert Enum.at(result[:options], 1)[:votes_count] == 1
assert Enum.at(result[:options], 2)[:votes_count] == 1
end