diff options
author | marcin mikołajczak <git@mkljczk.pl> | 2023-08-11 14:59:58 +0200 |
---|---|---|
committer | marcin mikołajczak <git@mkljczk.pl> | 2023-08-11 14:59:58 +0200 |
commit | 366559c5a33c30de181782418cd1b52f65d0ca5a (patch) | |
tree | 1c7b24d9ac369bd2b42fe4c7636503080c675458 /test | |
parent | 04c8f6b4d1e2a9a30f66b0ffb99d7a17a1510a3e (diff) | |
download | pleroma-366559c5a33c30de181782418cd1b52f65d0ca5a.tar.gz pleroma-366559c5a33c30de181782418cd1b52f65d0ca5a.zip |
Make status.language == nil for 'und' value
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
Diffstat (limited to 'test')
-rw-r--r-- | test/pleroma/web/mastodon_api/views/status_view_test.exs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/pleroma/web/mastodon_api/views/status_view_test.exs b/test/pleroma/web/mastodon_api/views/status_view_test.exs index d6884ac2c..8c53e6567 100644 --- a/test/pleroma/web/mastodon_api/views/status_view_test.exs +++ b/test/pleroma/web/mastodon_api/views/status_view_test.exs @@ -780,6 +780,16 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do assert status.language == "pl" end + test "doesn't show post language if it's 'und'" do + user = insert(:user) + + {:ok, post} = CommonAPI.post(user, %{status: "sdifjogijodfg", language: "und"}) + + status = StatusView.render("show.json", activity: post) + + assert status.language == nil + end + test "with a source object" do note = insert(:note, |