Tests: Make as many tests as possible async.
In general, tests that match these criteria can be made async: - Doesn't use real Cachex. - Doesn't write to the Config / Application Environment. - Uses Mock. Using Mox is fine. - Uses the streamer.
This commit is contained in:
parent
c9d73af74d
commit
9ba60f70d2
134 changed files with 141 additions and 137 deletions
|
@ -3,6 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Tasks.Pleroma.CountStatusesTest do
|
defmodule Mix.Tasks.Pleroma.CountStatusesTest do
|
||||||
|
# Uses log capture, has to stay synchronous
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase
|
||||||
|
|
||||||
alias Pleroma.User
|
alias Pleroma.User
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Tasks.Pleroma.DatabaseTest do
|
defmodule Mix.Tasks.Pleroma.DatabaseTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
use Oban.Testing, repo: Pleroma.Repo
|
use Oban.Testing, repo: Pleroma.Repo
|
||||||
|
|
||||||
alias Pleroma.Activity
|
alias Pleroma.Activity
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Tasks.Pleroma.Ecto.RollbackTest do
|
defmodule Mix.Tasks.Pleroma.Ecto.RollbackTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
import ExUnit.CaptureLog
|
import ExUnit.CaptureLog
|
||||||
require Logger
|
require Logger
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Tasks.Pleroma.InstanceTest do
|
defmodule Mix.Tasks.Pleroma.InstanceTest do
|
||||||
use ExUnit.Case
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
setup do
|
setup do
|
||||||
File.mkdir_p!(tmp_path())
|
File.mkdir_p!(tmp_path())
|
||||||
|
@ -15,15 +15,14 @@ defmodule Mix.Tasks.Pleroma.InstanceTest do
|
||||||
if File.exists?(static_dir) do
|
if File.exists?(static_dir) do
|
||||||
File.rm_rf(Path.join(static_dir, "robots.txt"))
|
File.rm_rf(Path.join(static_dir, "robots.txt"))
|
||||||
end
|
end
|
||||||
|
|
||||||
Pleroma.Config.put([:instance, :static_dir], static_dir)
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
:ok
|
:ok
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@uuid Ecto.UUID.generate()
|
||||||
defp tmp_path do
|
defp tmp_path do
|
||||||
"/tmp/generated_files/"
|
"/tmp/generated_files/#{@uuid}/"
|
||||||
end
|
end
|
||||||
|
|
||||||
test "running gen" do
|
test "running gen" do
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Mix.Tasks.Pleroma.RefreshCounterCacheTest do
|
defmodule Mix.Tasks.Pleroma.RefreshCounterCacheTest do
|
||||||
|
# Uses log capture, has to stay synchronous
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase
|
||||||
alias Pleroma.Web.CommonAPI
|
alias Pleroma.Web.CommonAPI
|
||||||
import ExUnit.CaptureIO, only: [capture_io: 1]
|
import ExUnit.CaptureIO, only: [capture_io: 1]
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Activity.Ir.TopicsTest do
|
defmodule Pleroma.Activity.Ir.TopicsTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Activity
|
alias Pleroma.Activity
|
||||||
alias Pleroma.Activity.Ir.Topics
|
alias Pleroma.Activity.Ir.Topics
|
||||||
|
|
|
@ -7,7 +7,7 @@ defmodule Pleroma.Activity.SearchTest do
|
||||||
alias Pleroma.Web.CommonAPI
|
alias Pleroma.Web.CommonAPI
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
test "it finds something" do
|
test "it finds something" do
|
||||||
user = insert(:user)
|
user = insert(:user)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.BBS.HandlerTest do
|
defmodule Pleroma.BBS.HandlerTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
alias Pleroma.Activity
|
alias Pleroma.Activity
|
||||||
alias Pleroma.BBS.Handler
|
alias Pleroma.BBS.Handler
|
||||||
alias Pleroma.Object
|
alias Pleroma.Object
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.BookmarkTest do
|
defmodule Pleroma.BookmarkTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
alias Pleroma.Bookmark
|
alias Pleroma.Bookmark
|
||||||
alias Pleroma.Web.CommonAPI
|
alias Pleroma.Web.CommonAPI
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.ConfigTest do
|
defmodule Pleroma.ConfigTest do
|
||||||
use ExUnit.Case
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
test "get/1 with an atom" do
|
test "get/1 with an atom" do
|
||||||
assert Pleroma.Config.get(:instance) == Application.get_env(:pleroma, :instance)
|
assert Pleroma.Config.get(:instance) == Application.get_env(:pleroma, :instance)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Conversation.ParticipationTest do
|
defmodule Pleroma.Conversation.ParticipationTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
alias Pleroma.Conversation
|
alias Pleroma.Conversation
|
||||||
alias Pleroma.Conversation.Participation
|
alias Pleroma.Conversation.Participation
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# Copyright © 2020 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2020 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
defmodule Pleroma.EarmarkRendererTest do
|
defmodule Pleroma.EarmarkRendererTest do
|
||||||
use ExUnit.Case
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
test "Paragraph" do
|
test "Paragraph" do
|
||||||
code = ~s[Hello\n\nWorld!]
|
code = ~s[Hello\n\nWorld!]
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
defmodule Pleroma.EctoType.ActivityPub.ObjectValidators.DateTimeTest do
|
defmodule Pleroma.EctoType.ActivityPub.ObjectValidators.DateTimeTest do
|
||||||
alias Pleroma.EctoType.ActivityPub.ObjectValidators.DateTime
|
alias Pleroma.EctoType.ActivityPub.ObjectValidators.DateTime
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
test "it validates an xsd:Datetime" do
|
test "it validates an xsd:Datetime" do
|
||||||
valid_strings = [
|
valid_strings = [
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
defmodule Pleroma.EctoType.ActivityPub.ObjectValidators.ObjectIDTest do
|
defmodule Pleroma.EctoType.ActivityPub.ObjectValidators.ObjectIDTest do
|
||||||
alias Pleroma.EctoType.ActivityPub.ObjectValidators.ObjectID
|
alias Pleroma.EctoType.ActivityPub.ObjectValidators.ObjectID
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
@uris [
|
@uris [
|
||||||
"http://lain.com/users/lain",
|
"http://lain.com/users/lain",
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
defmodule Pleroma.EctoType.ActivityPub.ObjectValidators.RecipientsTest do
|
defmodule Pleroma.EctoType.ActivityPub.ObjectValidators.RecipientsTest do
|
||||||
alias Pleroma.EctoType.ActivityPub.ObjectValidators.Recipients
|
alias Pleroma.EctoType.ActivityPub.ObjectValidators.Recipients
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
test "it asserts that all elements of the list are object ids" do
|
test "it asserts that all elements of the list are object ids" do
|
||||||
list = ["https://lain.com/users/lain", "invalid"]
|
list = ["https://lain.com/users/lain", "invalid"]
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.EctoType.ActivityPub.ObjectValidators.SafeTextTest do
|
defmodule Pleroma.EctoType.ActivityPub.ObjectValidators.SafeTextTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.EctoType.ActivityPub.ObjectValidators.SafeText
|
alias Pleroma.EctoType.ActivityPub.ObjectValidators.SafeText
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Emails.AdminEmailTest do
|
defmodule Pleroma.Emails.AdminEmailTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
||||||
alias Pleroma.Emails.AdminEmail
|
alias Pleroma.Emails.AdminEmail
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Emails.UserEmailTest do
|
defmodule Pleroma.Emails.UserEmailTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Emails.UserEmail
|
alias Pleroma.Emails.UserEmail
|
||||||
alias Pleroma.Web.Endpoint
|
alias Pleroma.Web.Endpoint
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
defmodule Pleroma.Emoji.FormatterTest do
|
defmodule Pleroma.Emoji.FormatterTest do
|
||||||
alias Pleroma.Emoji.Formatter
|
alias Pleroma.Emoji.Formatter
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
describe "emojify" do
|
describe "emojify" do
|
||||||
test "it adds cool emoji" do
|
test "it adds cool emoji" do
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Emoji.PackTest do
|
defmodule Pleroma.Emoji.PackTest do
|
||||||
use ExUnit.Case, async: true
|
use Pleroma.DataCase
|
||||||
alias Pleroma.Emoji.Pack
|
alias Pleroma.Emoji.Pack
|
||||||
|
|
||||||
@emoji_path Path.join(
|
@emoji_path Path.join(
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.EmojiTest do
|
defmodule Pleroma.EmojiTest do
|
||||||
use ExUnit.Case
|
use ExUnit.Case, async: true
|
||||||
alias Pleroma.Emoji
|
alias Pleroma.Emoji
|
||||||
|
|
||||||
describe "is_unicode_emoji?/1" do
|
describe "is_unicode_emoji?/1" do
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.FilterTest do
|
defmodule Pleroma.FilterTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.FollowingRelationshipTest do
|
defmodule Pleroma.FollowingRelationshipTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.FollowingRelationship
|
alias Pleroma.FollowingRelationship
|
||||||
alias Pleroma.Web.ActivityPub.InternalFetchActor
|
alias Pleroma.Web.ActivityPub.InternalFetchActor
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.HealthcheckTest do
|
defmodule Pleroma.HealthcheckTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
alias Pleroma.Healthcheck
|
alias Pleroma.Healthcheck
|
||||||
|
|
||||||
test "system_info/0" do
|
test "system_info/0" do
|
||||||
|
|
|
@ -6,7 +6,7 @@ defmodule Pleroma.HTMLTest do
|
||||||
alias Pleroma.HTML
|
alias Pleroma.HTML
|
||||||
alias Pleroma.Object
|
alias Pleroma.Object
|
||||||
alias Pleroma.Web.CommonAPI
|
alias Pleroma.Web.CommonAPI
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Integration.MastodonWebsocketTest do
|
defmodule Pleroma.Integration.MastodonWebsocketTest do
|
||||||
|
# Needs a streamer, needs to stay synchronous
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase
|
||||||
|
|
||||||
import ExUnit.CaptureLog
|
import ExUnit.CaptureLog
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.KeysTest do
|
defmodule Pleroma.KeysTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Keys
|
alias Pleroma.Keys
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
defmodule Pleroma.ListTest do
|
defmodule Pleroma.ListTest do
|
||||||
alias Pleroma.Repo
|
alias Pleroma.Repo
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.MarkerTest do
|
defmodule Pleroma.MarkerTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
alias Pleroma.Marker
|
alias Pleroma.Marker
|
||||||
|
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.MFA.BackupCodesTest do
|
defmodule Pleroma.MFA.BackupCodesTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.MFA.BackupCodes
|
alias Pleroma.MFA.BackupCodes
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.MFA.TOTPTest do
|
defmodule Pleroma.MFA.TOTPTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.MFA.TOTP
|
alias Pleroma.MFA.TOTP
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.MFATest do
|
defmodule Pleroma.MFATest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
alias Pleroma.MFA
|
alias Pleroma.MFA
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.MigrationHelper.NotificationBackfillTest do
|
defmodule Pleroma.MigrationHelper.NotificationBackfillTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Activity
|
alias Pleroma.Activity
|
||||||
alias Pleroma.MigrationHelper.NotificationBackfill
|
alias Pleroma.MigrationHelper.NotificationBackfill
|
||||||
|
|
|
@ -6,7 +6,7 @@ defmodule Pleroma.ModerationLogTest do
|
||||||
alias Pleroma.Activity
|
alias Pleroma.Activity
|
||||||
alias Pleroma.ModerationLog
|
alias Pleroma.ModerationLog
|
||||||
|
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.PaginationTest do
|
defmodule Pleroma.PaginationTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.RegistrationTest do
|
defmodule Pleroma.RegistrationTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
defmodule Pleroma.Repo.Migrations.FixLegacyTagsTest do
|
defmodule Pleroma.Repo.Migrations.FixLegacyTagsTest do
|
||||||
alias Pleroma.User
|
alias Pleroma.User
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
import Pleroma.Tests.Helpers
|
import Pleroma.Tests.Helpers
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Repo.Migrations.MoveWelcomeSettingsTest do
|
defmodule Pleroma.Repo.Migrations.MoveWelcomeSettingsTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
import Pleroma.Tests.Helpers
|
import Pleroma.Tests.Helpers
|
||||||
alias Pleroma.ConfigDB
|
alias Pleroma.ConfigDB
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.RepoTest do
|
defmodule Pleroma.RepoTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
||||||
alias Pleroma.User
|
alias Pleroma.User
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
defmodule Pleroma.ReportNoteTest do
|
defmodule Pleroma.ReportNoteTest do
|
||||||
alias Pleroma.ReportNote
|
alias Pleroma.ReportNote
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
||||||
test "create/3" do
|
test "create/3" do
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.SafeJsonbSetTest do
|
defmodule Pleroma.SafeJsonbSetTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
test "it doesn't wipe the object when asked to set the value to NULL" do
|
test "it doesn't wipe the object when asked to set the value to NULL" do
|
||||||
assert %{rows: [[%{"key" => "value", "test" => nil}]]} =
|
assert %{rows: [[%{"key" => "value", "test" => nil}]]} =
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.StatsTest do
|
defmodule Pleroma.StatsTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Upload.Filter.DedupeTest do
|
defmodule Pleroma.Upload.Filter.DedupeTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Upload
|
alias Pleroma.Upload
|
||||||
alias Pleroma.Upload.Filter.Dedupe
|
alias Pleroma.Upload.Filter.Dedupe
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Upload.Filter.ExiftoolTest do
|
defmodule Pleroma.Upload.Filter.ExiftoolTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
alias Pleroma.Upload.Filter
|
alias Pleroma.Upload.Filter
|
||||||
|
|
||||||
test "apply exiftool filter" do
|
test "apply exiftool filter" do
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Uploaders.LocalTest do
|
defmodule Pleroma.Uploaders.LocalTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
alias Pleroma.Uploaders.Local
|
alias Pleroma.Uploaders.Local
|
||||||
|
|
||||||
describe "get_file/1" do
|
describe "get_file/1" do
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.User.NotificationSettingTest do
|
defmodule Pleroma.User.NotificationSettingTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.User.NotificationSetting
|
alias Pleroma.User.NotificationSetting
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.User.QueryTest do
|
defmodule Pleroma.User.QueryTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Repo
|
alias Pleroma.Repo
|
||||||
alias Pleroma.User
|
alias Pleroma.User
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
defmodule Pleroma.UserRelationshipTest do
|
defmodule Pleroma.UserRelationshipTest do
|
||||||
alias Pleroma.UserRelationship
|
alias Pleroma.UserRelationship
|
||||||
|
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.MRF.AntiFollowbotPolicyTest do
|
defmodule Pleroma.Web.ActivityPub.MRF.AntiFollowbotPolicyTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
||||||
alias Pleroma.Web.ActivityPub.MRF.AntiFollowbotPolicy
|
alias Pleroma.Web.ActivityPub.MRF.AntiFollowbotPolicy
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.MRF.EnsureRePrependedTest do
|
defmodule Pleroma.Web.ActivityPub.MRF.EnsureRePrependedTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Activity
|
alias Pleroma.Activity
|
||||||
alias Pleroma.Object
|
alias Pleroma.Object
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.MRF.ForceBotUnlistedPolicyTest do
|
defmodule Pleroma.Web.ActivityPub.MRF.ForceBotUnlistedPolicyTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
||||||
alias Pleroma.Web.ActivityPub.MRF.ForceBotUnlistedPolicy
|
alias Pleroma.Web.ActivityPub.MRF.ForceBotUnlistedPolicy
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.MRF.NoPlaceholderTextPolicyTest do
|
defmodule Pleroma.Web.ActivityPub.MRF.NoPlaceholderTextPolicyTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
alias Pleroma.Web.ActivityPub.MRF.NoPlaceholderTextPolicy
|
alias Pleroma.Web.ActivityPub.MRF.NoPlaceholderTextPolicy
|
||||||
|
|
||||||
test "it clears content object" do
|
test "it clears content object" do
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.MRF.NormalizeMarkupTest do
|
defmodule Pleroma.Web.ActivityPub.MRF.NormalizeMarkupTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
alias Pleroma.Web.ActivityPub.MRF.NormalizeMarkup
|
alias Pleroma.Web.ActivityPub.MRF.NormalizeMarkup
|
||||||
|
|
||||||
@html_sample """
|
@html_sample """
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.MRF.TagPolicyTest do
|
defmodule Pleroma.Web.ActivityPub.MRF.TagPolicyTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
||||||
alias Pleroma.Web.ActivityPub.MRF.TagPolicy
|
alias Pleroma.Web.ActivityPub.MRF.TagPolicy
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.ObjectValidators.AcceptValidationTest do
|
defmodule Pleroma.Web.ActivityPub.ObjectValidators.AcceptValidationTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Web.ActivityPub.Builder
|
alias Pleroma.Web.ActivityPub.Builder
|
||||||
alias Pleroma.Web.ActivityPub.ObjectValidator
|
alias Pleroma.Web.ActivityPub.ObjectValidator
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.ObjectValidators.AnnounceValidationTest do
|
defmodule Pleroma.Web.ActivityPub.ObjectValidators.AnnounceValidationTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Object
|
alias Pleroma.Object
|
||||||
alias Pleroma.Web.ActivityPub.Builder
|
alias Pleroma.Web.ActivityPub.Builder
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.ObjectValidators.ArticleNoteValidatorTest do
|
defmodule Pleroma.Web.ActivityPub.ObjectValidators.ArticleNoteValidatorTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Web.ActivityPub.ObjectValidators.ArticleNoteValidator
|
alias Pleroma.Web.ActivityPub.ObjectValidators.ArticleNoteValidator
|
||||||
alias Pleroma.Web.ActivityPub.Utils
|
alias Pleroma.Web.ActivityPub.Utils
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.ObjectValidators.AttachmentValidatorTest do
|
defmodule Pleroma.Web.ActivityPub.ObjectValidators.AttachmentValidatorTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Web.ActivityPub.ActivityPub
|
alias Pleroma.Web.ActivityPub.ActivityPub
|
||||||
alias Pleroma.Web.ActivityPub.ObjectValidators.AttachmentValidator
|
alias Pleroma.Web.ActivityPub.ObjectValidators.AttachmentValidator
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.ObjectValidators.BlockValidationTest do
|
defmodule Pleroma.Web.ActivityPub.ObjectValidators.BlockValidationTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Web.ActivityPub.Builder
|
alias Pleroma.Web.ActivityPub.Builder
|
||||||
alias Pleroma.Web.ActivityPub.ObjectValidator
|
alias Pleroma.Web.ActivityPub.ObjectValidator
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.ObjectValidators.DeleteValidationTest do
|
defmodule Pleroma.Web.ActivityPub.ObjectValidators.DeleteValidationTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Object
|
alias Pleroma.Object
|
||||||
alias Pleroma.Web.ActivityPub.Builder
|
alias Pleroma.Web.ActivityPub.Builder
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.ObjectValidators.EmojiReactHandlingTest do
|
defmodule Pleroma.Web.ActivityPub.ObjectValidators.EmojiReactHandlingTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Web.ActivityPub.Builder
|
alias Pleroma.Web.ActivityPub.Builder
|
||||||
alias Pleroma.Web.ActivityPub.ObjectValidator
|
alias Pleroma.Web.ActivityPub.ObjectValidator
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.ObjectValidators.FollowValidationTest do
|
defmodule Pleroma.Web.ActivityPub.ObjectValidators.FollowValidationTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Web.ActivityPub.Builder
|
alias Pleroma.Web.ActivityPub.Builder
|
||||||
alias Pleroma.Web.ActivityPub.ObjectValidator
|
alias Pleroma.Web.ActivityPub.ObjectValidator
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.ObjectValidators.LikeValidationTest do
|
defmodule Pleroma.Web.ActivityPub.ObjectValidators.LikeValidationTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Web.ActivityPub.ObjectValidator
|
alias Pleroma.Web.ActivityPub.ObjectValidator
|
||||||
alias Pleroma.Web.ActivityPub.ObjectValidators.LikeValidator
|
alias Pleroma.Web.ActivityPub.ObjectValidators.LikeValidator
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.ObjectValidators.RejectValidationTest do
|
defmodule Pleroma.Web.ActivityPub.ObjectValidators.RejectValidationTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Web.ActivityPub.Builder
|
alias Pleroma.Web.ActivityPub.Builder
|
||||||
alias Pleroma.Web.ActivityPub.ObjectValidator
|
alias Pleroma.Web.ActivityPub.ObjectValidator
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.ObjectValidators.UndoHandlingTest do
|
defmodule Pleroma.Web.ActivityPub.ObjectValidators.UndoHandlingTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Web.ActivityPub.Builder
|
alias Pleroma.Web.ActivityPub.Builder
|
||||||
alias Pleroma.Web.ActivityPub.ObjectValidator
|
alias Pleroma.Web.ActivityPub.ObjectValidator
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.ObjectValidators.UpdateHandlingTest do
|
defmodule Pleroma.Web.ActivityPub.ObjectValidators.UpdateHandlingTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Web.ActivityPub.Builder
|
alias Pleroma.Web.ActivityPub.Builder
|
||||||
alias Pleroma.Web.ActivityPub.ObjectValidator
|
alias Pleroma.Web.ActivityPub.ObjectValidator
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.Transmogrifier.AcceptHandlingTest do
|
defmodule Pleroma.Web.ActivityPub.Transmogrifier.AcceptHandlingTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.User
|
alias Pleroma.User
|
||||||
alias Pleroma.Web.ActivityPub.Transmogrifier
|
alias Pleroma.Web.ActivityPub.Transmogrifier
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.Transmogrifier.BlockHandlingTest do
|
defmodule Pleroma.Web.ActivityPub.Transmogrifier.BlockHandlingTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Activity
|
alias Pleroma.Activity
|
||||||
alias Pleroma.User
|
alias Pleroma.User
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.Transmogrifier.EmojiReactHandlingTest do
|
defmodule Pleroma.Web.ActivityPub.Transmogrifier.EmojiReactHandlingTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Activity
|
alias Pleroma.Activity
|
||||||
alias Pleroma.Object
|
alias Pleroma.Object
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.Transmogrifier.LikeHandlingTest do
|
defmodule Pleroma.Web.ActivityPub.Transmogrifier.LikeHandlingTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Activity
|
alias Pleroma.Activity
|
||||||
alias Pleroma.Web.ActivityPub.Transmogrifier
|
alias Pleroma.Web.ActivityPub.Transmogrifier
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.Transmogrifier.RejectHandlingTest do
|
defmodule Pleroma.Web.ActivityPub.Transmogrifier.RejectHandlingTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Activity
|
alias Pleroma.Activity
|
||||||
alias Pleroma.User
|
alias Pleroma.User
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.Transmogrifier.UndoHandlingTest do
|
defmodule Pleroma.Web.ActivityPub.Transmogrifier.UndoHandlingTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Activity
|
alias Pleroma.Activity
|
||||||
alias Pleroma.Object
|
alias Pleroma.Object
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.Transmogrifier.UserUpdateHandlingTest do
|
defmodule Pleroma.Web.ActivityPub.Transmogrifier.UserUpdateHandlingTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Activity
|
alias Pleroma.Activity
|
||||||
alias Pleroma.User
|
alias Pleroma.User
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.UtilsTest do
|
defmodule Pleroma.Web.ActivityPub.UtilsTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
alias Pleroma.Activity
|
alias Pleroma.Activity
|
||||||
alias Pleroma.Object
|
alias Pleroma.Object
|
||||||
alias Pleroma.Repo
|
alias Pleroma.Repo
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.UserViewTest do
|
defmodule Pleroma.Web.ActivityPub.UserViewTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
||||||
alias Pleroma.User
|
alias Pleroma.User
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.ActivityPub.VisibilityTest do
|
defmodule Pleroma.Web.ActivityPub.VisibilityTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Activity
|
alias Pleroma.Activity
|
||||||
alias Pleroma.Web.ActivityPub.Visibility
|
alias Pleroma.Web.ActivityPub.Visibility
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.AdminAPI.ChatControllerTest do
|
defmodule Pleroma.Web.AdminAPI.ChatControllerTest do
|
||||||
use Pleroma.Web.ConnCase
|
use Pleroma.Web.ConnCase, async: true
|
||||||
|
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.AdminAPI.ReportControllerTest do
|
defmodule Pleroma.Web.AdminAPI.ReportControllerTest do
|
||||||
use Pleroma.Web.ConnCase
|
use Pleroma.Web.ConnCase, async: true
|
||||||
|
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.AdminAPI.StatusControllerTest do
|
defmodule Pleroma.Web.AdminAPI.StatusControllerTest do
|
||||||
use Pleroma.Web.ConnCase
|
use Pleroma.Web.ConnCase, async: true
|
||||||
|
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.AdminAPI.SearchTest do
|
defmodule Pleroma.Web.AdminAPI.SearchTest do
|
||||||
use Pleroma.Web.ConnCase
|
use Pleroma.Web.ConnCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Web.AdminAPI.Search
|
alias Pleroma.Web.AdminAPI.Search
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
defmodule Pleroma.Web.AdminAPI.ModerationLogViewTest do
|
defmodule Pleroma.Web.AdminAPI.ModerationLogViewTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Web.AdminAPI.ModerationLogView
|
alias Pleroma.Web.AdminAPI.ModerationLogView
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.AdminAPI.ReportViewTest do
|
defmodule Pleroma.Web.AdminAPI.ReportViewTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.Auth.AuthenticatorTest do
|
defmodule Pleroma.Web.Auth.AuthenticatorTest do
|
||||||
use Pleroma.Web.ConnCase
|
use Pleroma.Web.ConnCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Web.Auth.Authenticator
|
alias Pleroma.Web.Auth.Authenticator
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.Auth.BasicAuthTest do
|
defmodule Pleroma.Web.Auth.BasicAuthTest do
|
||||||
use Pleroma.Web.ConnCase
|
use Pleroma.Web.ConnCase, async: true
|
||||||
|
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.Auth.PleromaAuthenticatorTest do
|
defmodule Pleroma.Web.Auth.PleromaAuthenticatorTest do
|
||||||
use Pleroma.Web.ConnCase
|
use Pleroma.Web.ConnCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Web.Auth.PleromaAuthenticator
|
alias Pleroma.Web.Auth.PleromaAuthenticator
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.Auth.TOTPAuthenticatorTest do
|
defmodule Pleroma.Web.Auth.TOTPAuthenticatorTest do
|
||||||
use Pleroma.Web.ConnCase
|
use Pleroma.Web.ConnCase, async: true
|
||||||
|
|
||||||
alias Pleroma.MFA
|
alias Pleroma.MFA
|
||||||
alias Pleroma.MFA.BackupCodes
|
alias Pleroma.MFA.BackupCodes
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.Endpoint.MetricsExporterTest do
|
defmodule Pleroma.Web.Endpoint.MetricsExporterTest do
|
||||||
|
# Modifies AppEnv, has to stay synchronous
|
||||||
use Pleroma.Web.ConnCase
|
use Pleroma.Web.ConnCase
|
||||||
|
|
||||||
alias Pleroma.Web.Endpoint.MetricsExporter
|
alias Pleroma.Web.Endpoint.MetricsExporter
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.MastodonAPI.AuthControllerTest do
|
defmodule Pleroma.Web.MastodonAPI.AuthControllerTest do
|
||||||
use Pleroma.Web.ConnCase
|
use Pleroma.Web.ConnCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Config
|
alias Pleroma.Config
|
||||||
alias Pleroma.Repo
|
alias Pleroma.Repo
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.MastodonAPI.ConversationControllerTest do
|
defmodule Pleroma.Web.MastodonAPI.ConversationControllerTest do
|
||||||
use Pleroma.Web.ConnCase
|
use Pleroma.Web.ConnCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Conversation.Participation
|
alias Pleroma.Conversation.Participation
|
||||||
alias Pleroma.User
|
alias Pleroma.User
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.MastodonAPI.FilterControllerTest do
|
defmodule Pleroma.Web.MastodonAPI.FilterControllerTest do
|
||||||
use Pleroma.Web.ConnCase
|
use Pleroma.Web.ConnCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Web.MastodonAPI.FilterView
|
alias Pleroma.Web.MastodonAPI.FilterView
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.MastodonAPI.FollowRequestControllerTest do
|
defmodule Pleroma.Web.MastodonAPI.FollowRequestControllerTest do
|
||||||
use Pleroma.Web.ConnCase
|
use Pleroma.Web.ConnCase, async: true
|
||||||
|
|
||||||
alias Pleroma.User
|
alias Pleroma.User
|
||||||
alias Pleroma.Web.CommonAPI
|
alias Pleroma.Web.CommonAPI
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.MastodonAPI.ListControllerTest do
|
defmodule Pleroma.Web.MastodonAPI.ListControllerTest do
|
||||||
use Pleroma.Web.ConnCase
|
use Pleroma.Web.ConnCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Repo
|
alias Pleroma.Repo
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.MastodonAPI.MarkerControllerTest do
|
defmodule Pleroma.Web.MastodonAPI.MarkerControllerTest do
|
||||||
use Pleroma.Web.ConnCase
|
use Pleroma.Web.ConnCase, async: true
|
||||||
|
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.MastodonAPI.PollControllerTest do
|
defmodule Pleroma.Web.MastodonAPI.PollControllerTest do
|
||||||
use Pleroma.Web.ConnCase
|
use Pleroma.Web.ConnCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Object
|
alias Pleroma.Object
|
||||||
alias Pleroma.Web.CommonAPI
|
alias Pleroma.Web.CommonAPI
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.MastodonAPI.ReportControllerTest do
|
defmodule Pleroma.Web.MastodonAPI.ReportControllerTest do
|
||||||
use Pleroma.Web.ConnCase
|
use Pleroma.Web.ConnCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Web.CommonAPI
|
alias Pleroma.Web.CommonAPI
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.MastodonAPI.SubscriptionControllerTest do
|
defmodule Pleroma.Web.MastodonAPI.SubscriptionControllerTest do
|
||||||
use Pleroma.Web.ConnCase
|
use Pleroma.Web.ConnCase, async: true
|
||||||
|
|
||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.MastodonAPI.SuggestionControllerTest do
|
defmodule Pleroma.Web.MastodonAPI.SuggestionControllerTest do
|
||||||
use Pleroma.Web.ConnCase
|
use Pleroma.Web.ConnCase, async: true
|
||||||
|
|
||||||
setup do: oauth_access(["read"])
|
setup do: oauth_access(["read"])
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
|
defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
|
||||||
use Pleroma.Web.ConnCase
|
use Pleroma.Web.ConnCase, async: true
|
||||||
|
|
||||||
describe "empty_array/2 (stubs)" do
|
describe "empty_array/2 (stubs)" do
|
||||||
test "GET /api/v1/accounts/:id/identity_proofs" do
|
test "GET /api/v1/accounts/:id/identity_proofs" do
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.MastodonAPI.MastodonAPITest do
|
defmodule Pleroma.Web.MastodonAPI.MastodonAPITest do
|
||||||
use Pleroma.Web.ConnCase
|
use Pleroma.Web.ConnCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Notification
|
alias Pleroma.Notification
|
||||||
alias Pleroma.ScheduledActivity
|
alias Pleroma.ScheduledActivity
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Web.MastodonAPI.ConversationViewTest do
|
defmodule Pleroma.Web.MastodonAPI.ConversationViewTest do
|
||||||
use Pleroma.DataCase
|
use Pleroma.DataCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Conversation.Participation
|
alias Pleroma.Conversation.Participation
|
||||||
alias Pleroma.Web.CommonAPI
|
alias Pleroma.Web.CommonAPI
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue