diff options
| author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-09-06 13:26:05 +0300 |
|---|---|---|
| committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-09-06 13:26:05 +0300 |
| commit | ca1ba1e272fd51ee1d9524a39da07b4b2f9e0b6e (patch) | |
| tree | 7a9d31d44f362ff903813925171a4c31942b8261 /test/web/mastodon_api/views | |
| parent | 79cf629e1a3610a93f5b9349c18a4464eb859d3d (diff) | |
| parent | 896ffabe37406e85c2a3c2f30d2e882c68b5831e (diff) | |
| download | pleroma-ca1ba1e272fd51ee1d9524a39da07b4b2f9e0b6e.tar.gz pleroma-ca1ba1e272fd51ee1d9524a39da07b4b2f9e0b6e.zip | |
[#1149] Merge remote-tracking branch 'remotes/upstream/develop' into 1149-oban-job-queue
# Conflicts:
# test/web/twitter_api/twitter_api_controller_test.exs
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 |
