diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-05-13 12:42:36 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-05-13 12:42:36 +0300 |
commit | fd2fb2bb2e2292997fbe6f70c4d12b50c56cfab9 (patch) | |
tree | 12f2ac82ed24394fb52b5d0664583dc668814421 /test/stats_test.exs | |
parent | bfb48e3db6009c31e52cfe5ac4828a6143d7e549 (diff) | |
parent | 156c8a508846bd6d4e55f666c4ecc6f0129ac5fc (diff) | |
download | pleroma-fd2fb2bb2e2292997fbe6f70c4d12b50c56cfab9.tar.gz |
Merge remote-tracking branch 'remotes/origin/develop' into restricted-relations-embedding
# Conflicts:
# lib/pleroma/web/mastodon_api/controllers/status_controller.ex
# lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex
# test/web/mastodon_api/controllers/timeline_controller_test.exs
# test/web/mastodon_api/views/status_view_test.exs
Diffstat (limited to 'test/stats_test.exs')
-rw-r--r-- | test/stats_test.exs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/test/stats_test.exs b/test/stats_test.exs index c1aeb2c7f..4b76e2e78 100644 --- a/test/stats_test.exs +++ b/test/stats_test.exs @@ -22,26 +22,26 @@ defmodule Pleroma.StatsTest do user = insert(:user) other_user = insert(:user) - CommonAPI.post(user, %{"visibility" => "public", "status" => "hey"}) + CommonAPI.post(user, %{visibility: "public", status: "hey"}) Enum.each(0..1, fn _ -> CommonAPI.post(user, %{ - "visibility" => "unlisted", - "status" => "hey" + visibility: "unlisted", + status: "hey" }) end) Enum.each(0..2, fn _ -> CommonAPI.post(user, %{ - "visibility" => "direct", - "status" => "hey @#{other_user.nickname}" + visibility: "direct", + status: "hey @#{other_user.nickname}" }) end) Enum.each(0..3, fn _ -> CommonAPI.post(user, %{ - "visibility" => "private", - "status" => "hey" + visibility: "private", + status: "hey" }) end) @@ -51,7 +51,7 @@ defmodule Pleroma.StatsTest do test "on status delete" do user = insert(:user) - {:ok, activity} = CommonAPI.post(user, %{"visibility" => "public", "status" => "hey"}) + {:ok, activity} = CommonAPI.post(user, %{visibility: "public", status: "hey"}) assert %{public: 1} = Pleroma.Stats.get_status_visibility_count() CommonAPI.delete(activity.id, user) assert %{public: 0} = Pleroma.Stats.get_status_visibility_count() @@ -59,16 +59,16 @@ defmodule Pleroma.StatsTest do test "on status visibility update" do user = insert(:user) - {:ok, activity} = CommonAPI.post(user, %{"visibility" => "public", "status" => "hey"}) + {:ok, activity} = CommonAPI.post(user, %{visibility: "public", status: "hey"}) assert %{public: 1, private: 0} = Pleroma.Stats.get_status_visibility_count() - {:ok, _} = CommonAPI.update_activity_scope(activity.id, %{"visibility" => "private"}) + {:ok, _} = CommonAPI.update_activity_scope(activity.id, %{visibility: "private"}) assert %{public: 0, private: 1} = Pleroma.Stats.get_status_visibility_count() end test "doesn't count unrelated activities" do user = insert(:user) other_user = insert(:user) - {:ok, activity} = CommonAPI.post(user, %{"visibility" => "public", "status" => "hey"}) + {:ok, activity} = CommonAPI.post(user, %{visibility: "public", status: "hey"}) _ = CommonAPI.follow(user, other_user) CommonAPI.favorite(other_user, activity.id) CommonAPI.repeat(activity.id, other_user) |