diff options
author | Alex S <alex.strizhakov@gmail.com> | 2019-07-10 17:39:07 +0300 |
---|---|---|
committer | Alex S <alex.strizhakov@gmail.com> | 2019-07-10 17:42:18 +0300 |
commit | beba7bbc8550aca07874e105b784b7a3cbe89838 (patch) | |
tree | 4dbcc9d553ea00c62acfb27bfec2d87b7bd79962 /test/user/synchronization_worker_test.exs | |
parent | ade213cb35c8dc1a6f86e7b3836bc2ca86c8ff54 (diff) | |
download | pleroma-beba7bbc8550aca07874e105b784b7a3cbe89838.tar.gz pleroma-beba7bbc8550aca07874e105b784b7a3cbe89838.zip |
removing synchronization worker
Diffstat (limited to 'test/user/synchronization_worker_test.exs')
-rw-r--r-- | test/user/synchronization_worker_test.exs | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/test/user/synchronization_worker_test.exs b/test/user/synchronization_worker_test.exs deleted file mode 100644 index 835c5327f..000000000 --- a/test/user/synchronization_worker_test.exs +++ /dev/null @@ -1,49 +0,0 @@ -# Pleroma: A lightweight social networking server -# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/> -# SPDX-License-Identifier: AGPL-3.0-only - -defmodule Pleroma.User.SynchronizationWorkerTest do - use Pleroma.DataCase - import Pleroma.Factory - - setup do - Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end) - - config = Pleroma.Config.get([:instance, :external_user_synchronization]) - - for_update = [enabled: true, interval: 1000] - - Pleroma.Config.put([:instance, :external_user_synchronization], for_update) - - on_exit(fn -> - Pleroma.Config.put([:instance, :external_user_synchronization], config) - end) - - :ok - end - - test "sync follow counters" do - user1 = - insert(:user, - local: false, - ap_id: "http://localhost:4001/users/masto_closed" - ) - - user2 = insert(:user, local: false, ap_id: "http://localhost:4001/users/fuser2") - - {:ok, _} = Pleroma.User.SynchronizationWorker.start_link() - :timer.sleep(1500) - - %{follower_count: followers, following_count: following} = - Pleroma.User.get_cached_user_info(user1) - - assert followers == 437 - assert following == 152 - - %{follower_count: followers, following_count: following} = - Pleroma.User.get_cached_user_info(user2) - - assert followers == 527 - assert following == 267 - end -end |