X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Fuser_invite_token_test.exs;h=63f18f13c24e7f43bea74de5cf8d1b35151317cd;hb=f5845ff03395816902a637a28412f85e671575e7;hp=111e40361c5581913d3ee77bb2cdaf03fb1c80bf;hpb=eae991b06a22bf7fc3eef7a0d5b409c931c1f6cb;p=akkoma
diff --git a/test/user_invite_token_test.exs b/test/user_invite_token_test.exs
index 111e40361..63f18f13c 100644
--- a/test/user_invite_token_test.exs
+++ b/test/user_invite_token_test.exs
@@ -1,10 +1,9 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.UserInviteTokenTest do
use ExUnit.Case, async: true
- use Pleroma.DataCase
alias Pleroma.UserInviteToken
describe "valid_invite?/1 one time invites" do
@@ -64,7 +63,6 @@ defmodule Pleroma.UserInviteTokenTest do
test "expires yesterday returns false", %{invite: invite} do
invite = %{invite | expires_at: Date.add(Date.utc_today(), -1)}
- invite = Repo.insert!(invite)
refute UserInviteToken.valid_invite?(invite)
end
end
@@ -82,7 +80,6 @@ defmodule Pleroma.UserInviteTokenTest do
test "overdue date and less uses returns false", %{invite: invite} do
invite = %{invite | expires_at: Date.add(Date.utc_today(), -1)}
- invite = Repo.insert!(invite)
refute UserInviteToken.valid_invite?(invite)
end
@@ -93,7 +90,6 @@ defmodule Pleroma.UserInviteTokenTest do
test "overdue date with more uses returns false", %{invite: invite} do
invite = %{invite | expires_at: Date.add(Date.utc_today(), -1), uses: 5}
- invite = Repo.insert!(invite)
refute UserInviteToken.valid_invite?(invite)
end
end