diff options
author | Maxim Filippov <colixer@gmail.com> | 2019-09-10 01:23:20 +0300 |
---|---|---|
committer | Maxim Filippov <colixer@gmail.com> | 2019-09-10 01:23:20 +0300 |
commit | d1abf7a3585e4bc1ebea4f615ae2e149d5a56918 (patch) | |
tree | b76a8bacf53300bcd4816b3018311c23c51368c0 /test/web/mastodon_api/views | |
parent | 3542ca6702707ace070761c57350c10cd8c2a745 (diff) | |
parent | ceb2e09126a48fa341d5ff84371db49ae022bc12 (diff) | |
download | pleroma-d1abf7a3585e4bc1ebea4f615ae2e149d5a56918.tar.gz pleroma-d1abf7a3585e4bc1ebea4f615ae2e149d5a56918.zip |
Merge branch 'develop' into feature/moderation-log-filters
Diffstat (limited to 'test/web/mastodon_api/views')
-rw-r--r-- | test/web/mastodon_api/views/status_view_test.exs | 8 |
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 |