summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/views
diff options
context:
space:
mode:
authorMaxim Filippov <colixer@gmail.com>2019-09-16 14:40:17 +0300
committerMaxim Filippov <colixer@gmail.com>2019-09-16 14:40:17 +0300
commit219dca1b00a60805545dd3de433de285cc944af5 (patch)
treef8ffd4f93bf3f7bcd7ce0b789a18fb425134781a /test/web/mastodon_api/views
parent736165c082d34ef4d52367ea8315c228a1df3944 (diff)
parent409e701ab849475c81073d80a973487d67cadaae (diff)
downloadpleroma-219dca1b00a60805545dd3de433de285cc944af5.tar.gz
pleroma-219dca1b00a60805545dd3de433de285cc944af5.zip
Merge branch 'develop' into feature/return-total-for-reports
Diffstat (limited to 'test/web/mastodon_api/views')
-rw-r--r--test/web/mastodon_api/views/status_view_test.exs8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/web/mastodon_api/views/status_view_test.exs b/test/web/mastodon_api/views/status_view_test.exs
index 90451cbdc..fcdd7fbcb 100644
--- a/test/web/mastodon_api/views/status_view_test.exs
+++ b/test/web/mastodon_api/views/status_view_test.exs
@@ -551,6 +551,14 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
assert Enum.at(result[:options], 1)[:votes_count] == 1
assert Enum.at(result[:options], 2)[:votes_count] == 1
end
+
+ test "does not crash on polls with no end date" do
+ object = Object.normalize("https://skippers-bin.com/notes/7x9tmrp97i")
+ result = StatusView.render("poll.json", %{object: object})
+
+ assert result[:expires_at] == nil
+ assert result[:expired] == false
+ end
end
test "embeds a relationship in the account" do