Merge branch 'develop' into feature/bulk-confirmation
[akkoma] / test / web / oauth / token_test.exs
index 40d71eb59771228236e9ef2442ba61a2a976f835..c88b9cc9892cfab28c36f78b49e1cd73a00713e9 100644 (file)
@@ -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