diff options
author | Roger Braun <roger@rogerbraun.net> | 2017-04-14 17:13:51 +0200 |
---|---|---|
committer | Roger Braun <roger@rogerbraun.net> | 2017-04-14 17:13:51 +0200 |
commit | 03ddaead7e01d096cc3caa95a956d049be2e28f6 (patch) | |
tree | 14ffabd4929e556c668d94d6e5f21634397d6a2a /test | |
parent | 90b38fd51b4d40b6240ff5e5e3bb852eb18f97df (diff) | |
download | pleroma-03ddaead7e01d096cc3caa95a956d049be2e28f6.tar.gz |
Add basic user caching.
Expires after 5 seconds.
Diffstat (limited to 'test')
-rw-r--r-- | test/web/twitter_api/twitter_api_controller_test.exs | 6 | ||||
-rw-r--r-- | test/web/twitter_api/twitter_api_test.exs | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/test/web/twitter_api/twitter_api_controller_test.exs b/test/web/twitter_api/twitter_api_controller_test.exs index 728a1b6a8..a4128f442 100644 --- a/test/web/twitter_api/twitter_api_controller_test.exs +++ b/test/web/twitter_api/twitter_api_controller_test.exs @@ -184,4 +184,10 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do header_content = "Basic " <> Base.encode64("#{username}:#{password}") put_req_header(conn, "authorization", header_content) end + + setup do + Supervisor.terminate_child(Pleroma.Supervisor, ConCache) + Supervisor.restart_child(Pleroma.Supervisor, ConCache) + :ok + end end diff --git a/test/web/twitter_api/twitter_api_test.exs b/test/web/twitter_api/twitter_api_test.exs index 341622758..040a392e5 100644 --- a/test/web/twitter_api/twitter_api_test.exs +++ b/test/web/twitter_api/twitter_api_test.exs @@ -190,4 +190,10 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do assert status == ActivityRepresenter.to_map(updated_activity, %{user: activity_user, for: user}) end + + setup do + Supervisor.terminate_child(Pleroma.Supervisor, ConCache) + Supervisor.restart_child(Pleroma.Supervisor, ConCache) + :ok + end end |