diff options
author | Roman Chvanikov <chvanikoff@pm.me> | 2020-09-13 12:24:57 +0300 |
---|---|---|
committer | Roman Chvanikov <chvanikoff@pm.me> | 2020-09-13 12:24:57 +0300 |
commit | c5830ac037c0c344bd22b674c41f4dc244a088aa (patch) | |
tree | d5a02f43337536d05b934bee3012dab319ccc127 /test/web/oauth/token_test.exs | |
parent | 527afb813af6c64337d02ddf1a2f159fe557acbc (diff) | |
parent | 88fe0a262e21ba1284e72eddb1d41363dc029aa7 (diff) | |
download | pleroma-c5830ac037c0c344bd22b674c41f4dc244a088aa.tar.gz pleroma-c5830ac037c0c344bd22b674c41f4dc244a088aa.zip |
Merge develop
Diffstat (limited to 'test/web/oauth/token_test.exs')
-rw-r--r-- | test/web/oauth/token_test.exs | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/test/web/oauth/token_test.exs b/test/web/oauth/token_test.exs index 40d71eb59..c88b9cc98 100644 --- a/test/web/oauth/token_test.exs +++ b/test/web/oauth/token_test.exs @@ -69,17 +69,4 @@ defmodule Pleroma.Web.OAuth.TokenTest do assert tokens == 2 end - - test "deletes expired tokens" do - insert(:oauth_token, valid_until: Timex.shift(Timex.now(), days: -3)) - insert(:oauth_token, valid_until: Timex.shift(Timex.now(), days: -3)) - t3 = insert(:oauth_token) - t4 = insert(:oauth_token, valid_until: Timex.shift(Timex.now(), minutes: 10)) - {tokens, _} = Token.delete_expired_tokens() - assert tokens == 2 - available_tokens = Pleroma.Repo.all(Token) - - token_ids = available_tokens |> Enum.map(& &1.id) - assert token_ids == [t3.id, t4.id] - end end |