diff options
author | lain <lain@soykaf.club> | 2020-09-22 17:13:46 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-09-22 17:13:46 +0200 |
commit | c95859e45b18dec1d00f721ef3c5b4bb1406ea37 (patch) | |
tree | c22f7a200c0e0e551796bf5e9f1b09afccd64dd4 /test/web/oauth/token_test.exs | |
parent | 9853c90abba213bdc87dccf5620cb0d9eb19c049 (diff) | |
parent | 02f12ec6253093d8bedaf84d78d0f7e533745e1b (diff) | |
download | pleroma-c95859e45b18dec1d00f721ef3c5b4bb1406ea37.tar.gz pleroma-c95859e45b18dec1d00f721ef3c5b4bb1406ea37.zip |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into issue/2115
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 |