diff options
author | Maksim Pechnikov <parallel588@gmail.com> | 2019-09-07 22:13:43 +0300 |
---|---|---|
committer | Maksim Pechnikov <parallel588@gmail.com> | 2019-09-07 22:13:43 +0300 |
commit | 39f99dc6cd9295e1b62b27ed1566d53c8c0291fc (patch) | |
tree | 48e0f59948462378451f09fc4307777d5080e58b /test/web/mastodon_api/views | |
parent | ae506ca997619f118d18703a9b0802246eb427d5 (diff) | |
parent | c45013df8e53334bcc1afb8cd1df673c290037ee (diff) | |
download | pleroma-39f99dc6cd9295e1b62b27ed1566d53c8c0291fc.tar.gz pleroma-39f99dc6cd9295e1b62b27ed1566d53c8c0291fc.zip |
Merge branch 'develop' into support/tests
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 |