summaryrefslogtreecommitdiff
path: root/test/stats_test.exs
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2019-12-21 11:49:35 +0000
committerrinpatch <rinpatch@sdf.org>2019-12-21 11:49:35 +0000
commit7447c80e33a7d54c3d9f03f5c0be3fb738f1318b (patch)
treec1ad7b149725b6df8ec5f4de7d25ab1e50d35020 /test/stats_test.exs
parent0193b0862fd8a7bdaef7fe6ebb9f499a086ca761 (diff)
parente71a13ad57d2604b45c0beb278f47d25c284783a (diff)
downloadpleroma-7447c80e33a7d54c3d9f03f5c0be3fb738f1318b.tar.gz
pleroma-7447c80e33a7d54c3d9f03f5c0be3fb738f1318b.zip
Merge branch 'revert-a54aa5af' into 'develop'
Revert "Merge branch 'feature/status-counts-by-scope' into 'develop'" Closes #1488 See merge request pleroma/pleroma!2083
Diffstat (limited to 'test/stats_test.exs')
-rw-r--r--test/stats_test.exs53
1 files changed, 0 insertions, 53 deletions
diff --git a/test/stats_test.exs b/test/stats_test.exs
deleted file mode 100644
index 02a92dc64..000000000
--- a/test/stats_test.exs
+++ /dev/null
@@ -1,53 +0,0 @@
-# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
-# SPDX-License-Identifier: AGPL-3.0-only
-
-defmodule Pleroma.StatsTest do
- use Pleroma.DataCase
-
- import Pleroma.Factory
-
- alias Pleroma.Web.CommonAPI
-
- describe "statuses count" do
- setup do
- user = insert(:user)
- other_user = insert(:user)
-
- CommonAPI.post(user, %{"visibility" => "public", "status" => "hey"})
-
- Enum.each(0..1, fn _ ->
- CommonAPI.post(user, %{
- "visibility" => "unlisted",
- "status" => "hey"
- })
- end)
-
- Enum.each(0..2, fn _ ->
- CommonAPI.post(user, %{
- "visibility" => "direct",
- "status" => "hey @#{other_user.nickname}"
- })
- end)
-
- Enum.each(0..3, fn _ ->
- CommonAPI.post(user, %{
- "visibility" => "private",
- "status" => "hey"
- })
- end)
-
- :ok
- end
-
- test "it returns total number of statuses" do
- data = Pleroma.Stats.get_stat_data()
-
- assert data.stats.status_count.all == 10
- assert data.stats.status_count.public == 1
- assert data.stats.status_count.unlisted == 2
- assert data.stats.status_count.direct == 3
- assert data.stats.status_count.private == 4
- end
- end
-end