summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/mastodon_api_controller_test.exs
diff options
context:
space:
mode:
authorkaniini <nenolod@gmail.com>2019-01-25 05:00:47 +0000
committerkaniini <nenolod@gmail.com>2019-01-25 05:00:47 +0000
commitc9b418e5477229017b3750c55cf3ea3d03b7e609 (patch)
treed1b458bea76ff3ec296897de405f9e3c8578f897 /test/web/mastodon_api/mastodon_api_controller_test.exs
parent44693fbf6e5c5ec5622207e263688e3af7d1a83a (diff)
parent4df71cd88b2725f1838c2899b3078a74dbb0c33f (diff)
downloadpleroma-c9b418e5477229017b3750c55cf3ea3d03b7e609.tar.gz
pleroma-c9b418e5477229017b3750c55cf3ea3d03b7e609.zip
Merge branch 'develop' into 'oembed_provider'
# Conflicts: # lib/pleroma/activity.ex
Diffstat (limited to 'test/web/mastodon_api/mastodon_api_controller_test.exs')
-rw-r--r--test/web/mastodon_api/mastodon_api_controller_test.exs11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs
index dd84052a3..8443dc856 100644
--- a/test/web/mastodon_api/mastodon_api_controller_test.exs
+++ b/test/web/mastodon_api/mastodon_api_controller_test.exs
@@ -10,6 +10,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
alias Pleroma.Web.{OStatus, CommonAPI}
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.MastodonAPI.FilterView
+ alias Ecto.Changeset
import Pleroma.Factory
import ExUnit.CaptureLog
import Tesla.Mock
@@ -1483,6 +1484,16 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
{:ok, _} = TwitterAPI.create_status(user, %{"status" => "cofe"})
+ # Stats should count users with missing or nil `info.deactivated` value
+ user = Repo.get(User, user.id)
+ info_change = Changeset.change(user.info, %{deactivated: nil})
+
+ {:ok, _user} =
+ user
+ |> Changeset.change()
+ |> Changeset.put_embed(:info, info_change)
+ |> User.update_and_set_cache()
+
Pleroma.Stats.update_stats()
conn = get(conn, "/api/v1/instance")