diff options
| author | lambda <lain@soykaf.club> | 2019-03-13 09:09:44 +0000 | 
|---|---|---|
| committer | lambda <lain@soykaf.club> | 2019-03-13 09:09:44 +0000 | 
| commit | 92a0210fb03ca3e0aefe769fb6b0ab7bda6e5336 (patch) | |
| tree | 56e78105e29834c60f73c1bf8c39a983d88421a4 /test | |
| parent | d0e94d5f1baac7a19d6cdd33b1f54470041e7227 (diff) | |
| parent | d43b1c0b5d203fd4f195951ac7b60b666a43914f (diff) | |
| download | pleroma-92a0210fb03ca3e0aefe769fb6b0ab7bda6e5336.tar.gz pleroma-92a0210fb03ca3e0aefe769fb6b0ab7bda6e5336.zip  | |
Merge branch 'features/add-credo-to-ci' into 'develop'
Add credo to CI
See merge request pleroma/pleroma!902
Diffstat (limited to 'test')
39 files changed, 102 insertions, 93 deletions
diff --git a/test/integration/mastodon_websocket_test.exs b/test/integration/mastodon_websocket_test.exs index 0c513b6e7..b42c9ef07 100644 --- a/test/integration/mastodon_websocket_test.exs +++ b/test/integration/mastodon_websocket_test.exs @@ -7,9 +7,9 @@ defmodule Pleroma.Integration.MastodonWebsocketTest do    import Pleroma.Factory +  alias Pleroma.Integration.WebsocketClient    alias Pleroma.Web.CommonAPI    alias Pleroma.Web.OAuth -  alias Pleroma.Integration.WebsocketClient    alias Pleroma.Web.Streamer    @path Pleroma.Web.Endpoint.url() diff --git a/test/jobs_test.exs b/test/jobs_test.exs index ccb518dec..d55c86ccc 100644 --- a/test/jobs_test.exs +++ b/test/jobs_test.exs @@ -5,8 +5,8 @@  defmodule Pleroma.JobsTest do    use ExUnit.Case, async: true -  alias Pleroma.Jobs    alias Jobs.WorkerMock +  alias Pleroma.Jobs    setup do      state = %{ diff --git a/test/notification_test.exs b/test/notification_test.exs index 755874a3d..12b4292aa 100644 --- a/test/notification_test.exs +++ b/test/notification_test.exs @@ -4,11 +4,11 @@  defmodule Pleroma.NotificationTest do    use Pleroma.DataCase -  alias Pleroma.Web.TwitterAPI.TwitterAPI -  alias Pleroma.Web.CommonAPI -  alias Pleroma.User    alias Pleroma.Notification +  alias Pleroma.User    alias Pleroma.Web.ActivityPub.Transmogrifier +  alias Pleroma.Web.CommonAPI +  alias Pleroma.Web.TwitterAPI.TwitterAPI    import Pleroma.Factory    describe "create_notifications" do diff --git a/test/object_test.exs b/test/object_test.exs index a820a34ee..911757d57 100644 --- a/test/object_test.exs +++ b/test/object_test.exs @@ -5,8 +5,8 @@  defmodule Pleroma.ObjectTest do    use Pleroma.DataCase    import Pleroma.Factory -  alias Pleroma.Repo    alias Pleroma.Object +  alias Pleroma.Repo    test "returns an object by it's AP id" do      object = insert(:note) diff --git a/test/support/builders/user_builder.ex b/test/support/builders/user_builder.ex index 611a5be18..f58e1b0ad 100644 --- a/test/support/builders/user_builder.ex +++ b/test/support/builders/user_builder.ex @@ -1,6 +1,6 @@  defmodule Pleroma.Builders.UserBuilder do -  alias Pleroma.User    alias Pleroma.Repo +  alias Pleroma.User    def build(data \\ %{}) do      user = %User{ diff --git a/test/support/captcha_mock.ex b/test/support/captcha_mock.ex index 9061f2b45..ef4e68bc5 100644 --- a/test/support/captcha_mock.ex +++ b/test/support/captcha_mock.ex @@ -7,7 +7,7 @@ defmodule Pleroma.Captcha.Mock do    @behaviour Service    @impl Service -  def new(), do: %{type: :mock} +  def new, do: %{type: :mock}    @impl Service    def validate(_token, _captcha, _data), do: :ok diff --git a/test/tasks/relay_test.exs b/test/tasks/relay_test.exs index 64ff07753..c9d90fa2e 100644 --- a/test/tasks/relay_test.exs +++ b/test/tasks/relay_test.exs @@ -4,10 +4,10 @@  defmodule Mix.Tasks.Pleroma.RelayTest do    alias Pleroma.Activity +  alias Pleroma.User    alias Pleroma.Web.ActivityPub.ActivityPub -  alias Pleroma.Web.ActivityPub.Utils    alias Pleroma.Web.ActivityPub.Relay -  alias Pleroma.User +  alias Pleroma.Web.ActivityPub.Utils    use Pleroma.DataCase    setup_all do diff --git a/test/user_test.exs b/test/user_test.exs index 3a5f3c240..c57eb2c06 100644 --- a/test/user_test.exs +++ b/test/user_test.exs @@ -3,8 +3,8 @@  # SPDX-License-Identifier: AGPL-3.0-only  defmodule Pleroma.UserTest do -  alias Pleroma.Builders.UserBuilder    alias Pleroma.Activity +  alias Pleroma.Builders.UserBuilder    alias Pleroma.Repo    alias Pleroma.User    alias Pleroma.Web.CommonAPI diff --git a/test/web/activity_pub/activity_pub_controller_test.exs b/test/web/activity_pub/activity_pub_controller_test.exs index 6bd4493f5..a1e83b380 100644 --- a/test/web/activity_pub/activity_pub_controller_test.exs +++ b/test/web/activity_pub/activity_pub_controller_test.exs @@ -5,13 +5,13 @@  defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do    use Pleroma.Web.ConnCase    import Pleroma.Factory -  alias Pleroma.Web.ActivityPub.UserView -  alias Pleroma.Web.ActivityPub.ObjectView +  alias Pleroma.Activity +  alias Pleroma.Instances    alias Pleroma.Object    alias Pleroma.Repo -  alias Pleroma.Activity    alias Pleroma.User -  alias Pleroma.Instances +  alias Pleroma.Web.ActivityPub.ObjectView +  alias Pleroma.Web.ActivityPub.UserView    setup_all do      Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end) diff --git a/test/web/activity_pub/activity_pub_test.exs b/test/web/activity_pub/activity_pub_test.exs index 10c5258d0..2b83bfb1d 100644 --- a/test/web/activity_pub/activity_pub_test.exs +++ b/test/web/activity_pub/activity_pub_test.exs @@ -4,14 +4,14 @@  defmodule Pleroma.Web.ActivityPub.ActivityPubTest do    use Pleroma.DataCase -  alias Pleroma.Web.ActivityPub.ActivityPub -  alias Pleroma.Web.ActivityPub.Utils -  alias Pleroma.Web.CommonAPI    alias Pleroma.Activity +  alias Pleroma.Builders.ActivityBuilder +  alias Pleroma.Instances    alias Pleroma.Object    alias Pleroma.User -  alias Pleroma.Instances -  alias Pleroma.Builders.ActivityBuilder +  alias Pleroma.Web.ActivityPub.ActivityPub +  alias Pleroma.Web.ActivityPub.Utils +  alias Pleroma.Web.CommonAPI    import Pleroma.Factory    import Tesla.Mock diff --git a/test/web/activity_pub/transmogrifier_test.exs b/test/web/activity_pub/transmogrifier_test.exs index 86c66deff..8184dbbae 100644 --- a/test/web/activity_pub/transmogrifier_test.exs +++ b/test/web/activity_pub/transmogrifier_test.exs @@ -4,13 +4,13 @@  defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do    use Pleroma.DataCase +  alias Pleroma.Activity +  alias Pleroma.Repo +  alias Pleroma.User +  alias Pleroma.Web.ActivityPub.ActivityPub    alias Pleroma.Web.ActivityPub.Transmogrifier    alias Pleroma.Web.ActivityPub.Utils -  alias Pleroma.Web.ActivityPub.ActivityPub    alias Pleroma.Web.OStatus -  alias Pleroma.Activity -  alias Pleroma.User -  alias Pleroma.Repo    alias Pleroma.Web.Websub.WebsubClientSubscription    import Pleroma.Factory diff --git a/test/web/activity_pub/utils_test.exs b/test/web/activity_pub/utils_test.exs index 1300039aa..2bd3ddf93 100644 --- a/test/web/activity_pub/utils_test.exs +++ b/test/web/activity_pub/utils_test.exs @@ -1,7 +1,7 @@  defmodule Pleroma.Web.ActivityPub.UtilsTest do    use Pleroma.DataCase -  alias Pleroma.Web.CommonAPI    alias Pleroma.Web.ActivityPub.Utils +  alias Pleroma.Web.CommonAPI    import Pleroma.Factory diff --git a/test/web/activity_pub/views/object_view_test.exs b/test/web/activity_pub/views/object_view_test.exs index d144a77fc..d939fc5a7 100644 --- a/test/web/activity_pub/views/object_view_test.exs +++ b/test/web/activity_pub/views/object_view_test.exs @@ -2,8 +2,8 @@ defmodule Pleroma.Web.ActivityPub.ObjectViewTest do    use Pleroma.DataCase    import Pleroma.Factory -  alias Pleroma.Web.CommonAPI    alias Pleroma.Web.ActivityPub.ObjectView +  alias Pleroma.Web.CommonAPI    test "renders a note object" do      note = insert(:note) diff --git a/test/web/activity_pub/visibilty_test.exs b/test/web/activity_pub/visibilty_test.exs index 1172b7455..24b96c4aa 100644 --- a/test/web/activity_pub/visibilty_test.exs +++ b/test/web/activity_pub/visibilty_test.exs @@ -1,8 +1,8 @@  defmodule Pleroma.Web.ActivityPub.VisibilityTest do    use Pleroma.DataCase -  alias Pleroma.Web.CommonAPI    alias Pleroma.Web.ActivityPub.Visibility +  alias Pleroma.Web.CommonAPI    import Pleroma.Factory    setup do diff --git a/test/web/common_api/common_api_test.exs b/test/web/common_api/common_api_test.exs index 9ba320f59..181813c76 100644 --- a/test/web/common_api/common_api_test.exs +++ b/test/web/common_api/common_api_test.exs @@ -4,9 +4,9 @@  defmodule Pleroma.Web.CommonAPITest do    use Pleroma.DataCase -  alias Pleroma.Web.CommonAPI -  alias Pleroma.User    alias Pleroma.Activity +  alias Pleroma.User +  alias Pleroma.Web.CommonAPI    import Pleroma.Factory diff --git a/test/web/common_api/common_api_utils_test.exs b/test/web/common_api/common_api_utils_test.exs index 684f2a23f..4c97b0d62 100644 --- a/test/web/common_api/common_api_utils_test.exs +++ b/test/web/common_api/common_api_utils_test.exs @@ -3,9 +3,9 @@  # SPDX-License-Identifier: AGPL-3.0-only  defmodule Pleroma.Web.CommonAPI.UtilsTest do +  alias Pleroma.Builders.UserBuilder    alias Pleroma.Web.CommonAPI.Utils    alias Pleroma.Web.Endpoint -  alias Pleroma.Builders.UserBuilder    use Pleroma.DataCase    test "it adds attachment links to a given text and attachment set" do diff --git a/test/web/federator_test.exs b/test/web/federator_test.exs index 08279f230..52729eb50 100644 --- a/test/web/federator_test.exs +++ b/test/web/federator_test.exs @@ -3,9 +3,9 @@  # SPDX-License-Identifier: AGPL-3.0-only  defmodule Pleroma.Web.FederatorTest do +  alias Pleroma.Instances    alias Pleroma.Web.CommonAPI    alias Pleroma.Web.Federator -  alias Pleroma.Instances    use Pleroma.DataCase    import Pleroma.Factory    import Mock diff --git a/test/web/instances/instance_test.exs b/test/web/instances/instance_test.exs index a158c0a42..d28730994 100644 --- a/test/web/instances/instance_test.exs +++ b/test/web/instances/instance_test.exs @@ -3,8 +3,8 @@  # SPDX-License-Identifier: AGPL-3.0-only  defmodule Pleroma.Instances.InstanceTest do -  alias Pleroma.Repo    alias Pleroma.Instances.Instance +  alias Pleroma.Repo    use Pleroma.DataCase diff --git a/test/web/instances/instances_test.exs b/test/web/instances/instances_test.exs index 2530c09fe..f0d84edea 100644 --- a/test/web/instances/instances_test.exs +++ b/test/web/instances/instances_test.exs @@ -102,7 +102,8 @@ defmodule Pleroma.InstancesTest do      end    end -  # Note: implementation-specific (e.g. Instance) details of set_unreachable/1 should be tested in implementation-specific tests +  # Note: implementation-specific (e.g. Instance) details of set_unreachable/1 +  # should be tested in implementation-specific tests    describe "set_unreachable/1" do      test "returns error status on non-binary input" do        assert {:error, _} = Instances.set_unreachable(nil) diff --git a/test/web/mastodon_api/account_view_test.exs b/test/web/mastodon_api/account_view_test.exs index 6be66ef63..c2ffc21da 100644 --- a/test/web/mastodon_api/account_view_test.exs +++ b/test/web/mastodon_api/account_view_test.exs @@ -5,8 +5,8 @@  defmodule Pleroma.Web.MastodonAPI.AccountViewTest do    use Pleroma.DataCase    import Pleroma.Factory -  alias Pleroma.Web.MastodonAPI.AccountView    alias Pleroma.User +  alias Pleroma.Web.MastodonAPI.AccountView    test "Represent a user account" do      source_data = %{ diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index 2caf514bb..059d5237d 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -5,17 +5,17 @@  defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do    use Pleroma.Web.ConnCase -  alias Pleroma.Web.TwitterAPI.TwitterAPI -  alias Pleroma.Repo -  alias Pleroma.User -  alias Pleroma.Object +  alias Ecto.Changeset    alias Pleroma.Activity    alias Pleroma.Notification -  alias Pleroma.Web.OStatus -  alias Pleroma.Web.CommonAPI +  alias Pleroma.Object +  alias Pleroma.Repo +  alias Pleroma.User    alias Pleroma.Web.ActivityPub.ActivityPub +  alias Pleroma.Web.CommonAPI    alias Pleroma.Web.MastodonAPI.FilterView -  alias Ecto.Changeset +  alias Pleroma.Web.OStatus +  alias Pleroma.Web.TwitterAPI.TwitterAPI    import Pleroma.Factory    import ExUnit.CaptureLog    import Tesla.Mock @@ -1632,9 +1632,10 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do        assert user = json_response(conn, 200)        assert user["note"] == -               "I drink <a class=\"hashtag\" data-tag=\"cofe\" href=\"http://localhost:4001/tag/cofe\">#cofe</a> with <span class=\"h-card\"><a data-user=\"#{ -                 user2.id -               }\" class=\"u-url mention\" href=\"#{user2.ap_id}\">@<span>#{user2.nickname}</span></a></span>" +               ~s(I drink <a class="hashtag" data-tag="cofe" href="http://localhost:4001/tag/cofe">#cofe</a> with <span class="h-card"><a data-user=") <> +                 user2.id <> +                 ~s(" class="u-url mention" href=") <> +                 user2.ap_id <> ~s(">@<span>) <> user2.nickname <> ~s(</span></a></span>)      end      test "updates the user's locking status", %{conn: conn} do diff --git a/test/web/mastodon_api/status_view_test.exs b/test/web/mastodon_api/status_view_test.exs index 485a0b4f7..3eec2cb5b 100644 --- a/test/web/mastodon_api/status_view_test.exs +++ b/test/web/mastodon_api/status_view_test.exs @@ -5,13 +5,13 @@  defmodule Pleroma.Web.MastodonAPI.StatusViewTest do    use Pleroma.DataCase +  alias Pleroma.Activity +  alias Pleroma.User +  alias Pleroma.Web.ActivityPub.ActivityPub +  alias Pleroma.Web.CommonAPI    alias Pleroma.Web.MastodonAPI.AccountView    alias Pleroma.Web.MastodonAPI.StatusView -  alias Pleroma.User    alias Pleroma.Web.OStatus -  alias Pleroma.Web.CommonAPI -  alias Pleroma.Web.ActivityPub.ActivityPub -  alias Pleroma.Activity    import Pleroma.Factory    import Tesla.Mock diff --git a/test/web/oauth/authorization_test.exs b/test/web/oauth/authorization_test.exs index 306db2e62..d8b008437 100644 --- a/test/web/oauth/authorization_test.exs +++ b/test/web/oauth/authorization_test.exs @@ -4,8 +4,8 @@  defmodule Pleroma.Web.OAuth.AuthorizationTest do    use Pleroma.DataCase -  alias Pleroma.Web.OAuth.Authorization    alias Pleroma.Web.OAuth.App +  alias Pleroma.Web.OAuth.Authorization    import Pleroma.Factory    setup do diff --git a/test/web/oauth/token_test.exs b/test/web/oauth/token_test.exs index 62444a0fa..ad2a49f09 100644 --- a/test/web/oauth/token_test.exs +++ b/test/web/oauth/token_test.exs @@ -4,10 +4,10 @@  defmodule Pleroma.Web.OAuth.TokenTest do    use Pleroma.DataCase +  alias Pleroma.Repo    alias Pleroma.Web.OAuth.App    alias Pleroma.Web.OAuth.Authorization    alias Pleroma.Web.OAuth.Token -  alias Pleroma.Repo    import Pleroma.Factory diff --git a/test/web/ostatus/activity_representer_test.exs b/test/web/ostatus/activity_representer_test.exs index eebc5c040..5cb135b4c 100644 --- a/test/web/ostatus/activity_representer_test.exs +++ b/test/web/ostatus/activity_representer_test.exs @@ -5,12 +5,12 @@  defmodule Pleroma.Web.OStatus.ActivityRepresenterTest do    use Pleroma.DataCase -  alias Pleroma.Web.OStatus.ActivityRepresenter    alias Pleroma.Activity -  alias Pleroma.User    alias Pleroma.Object +  alias Pleroma.User    alias Pleroma.Web.ActivityPub.ActivityPub    alias Pleroma.Web.OStatus +  alias Pleroma.Web.OStatus.ActivityRepresenter    import Pleroma.Factory    import Tesla.Mock diff --git a/test/web/ostatus/feed_representer_test.exs b/test/web/ostatus/feed_representer_test.exs index efd4e7217..3c7b126e7 100644 --- a/test/web/ostatus/feed_representer_test.exs +++ b/test/web/ostatus/feed_representer_test.exs @@ -6,10 +6,10 @@ defmodule Pleroma.Web.OStatus.FeedRepresenterTest do    use Pleroma.DataCase    import Pleroma.Factory    alias Pleroma.User +  alias Pleroma.Web.OStatus    alias Pleroma.Web.OStatus.ActivityRepresenter    alias Pleroma.Web.OStatus.FeedRepresenter    alias Pleroma.Web.OStatus.UserRepresenter -  alias Pleroma.Web.OStatus    test "returns a feed of the last 20 items of the user" do      note_activity = insert(:note_activity) diff --git a/test/web/ostatus/incoming_documents/delete_handling_test.exs b/test/web/ostatus/incoming_documents/delete_handling_test.exs index d295cc539..412d894fd 100644 --- a/test/web/ostatus/incoming_documents/delete_handling_test.exs +++ b/test/web/ostatus/incoming_documents/delete_handling_test.exs @@ -4,9 +4,9 @@ defmodule Pleroma.Web.OStatus.DeleteHandlingTest do    import Pleroma.Factory    import Tesla.Mock -  alias Pleroma.Repo    alias Pleroma.Activity    alias Pleroma.Object +  alias Pleroma.Repo    alias Pleroma.Web.OStatus    setup do diff --git a/test/web/ostatus/ostatus_controller_test.exs b/test/web/ostatus/ostatus_controller_test.exs index da9c72be8..2950f11c0 100644 --- a/test/web/ostatus/ostatus_controller_test.exs +++ b/test/web/ostatus/ostatus_controller_test.exs @@ -5,9 +5,9 @@  defmodule Pleroma.Web.OStatus.OStatusControllerTest do    use Pleroma.Web.ConnCase    import Pleroma.Factory -  alias Pleroma.User -  alias Pleroma.Repo    alias Pleroma.Object +  alias Pleroma.Repo +  alias Pleroma.User    alias Pleroma.Web.CommonAPI    alias Pleroma.Web.OStatus.ActivityRepresenter diff --git a/test/web/ostatus/ostatus_test.exs b/test/web/ostatus/ostatus_test.exs index b4b19ab05..76b90e186 100644 --- a/test/web/ostatus/ostatus_test.exs +++ b/test/web/ostatus/ostatus_test.exs @@ -4,13 +4,13 @@  defmodule Pleroma.Web.OStatusTest do    use Pleroma.DataCase -  alias Pleroma.Web.OStatus -  alias Pleroma.Web.XML +  alias Pleroma.Activity +  alias Pleroma.Instances    alias Pleroma.Object    alias Pleroma.Repo    alias Pleroma.User -  alias Pleroma.Activity -  alias Pleroma.Instances +  alias Pleroma.Web.OStatus +  alias Pleroma.Web.XML    import Pleroma.Factory    import ExUnit.CaptureLog diff --git a/test/web/salmon/salmon_test.exs b/test/web/salmon/salmon_test.exs index 9e583ba40..265e1abbd 100644 --- a/test/web/salmon/salmon_test.exs +++ b/test/web/salmon/salmon_test.exs @@ -4,10 +4,10 @@  defmodule Pleroma.Web.Salmon.SalmonTest do    use Pleroma.DataCase -  alias Pleroma.Web.Salmon    alias Pleroma.Activity    alias Pleroma.Repo    alias Pleroma.User +  alias Pleroma.Web.Salmon    import Pleroma.Factory    @magickey "RSA.pu0s-halox4tu7wmES1FVSx6u-4wc0YrUFXcqWXZG4-27UmbCOpMQftRCldNRfyA-qLbz-eqiwQhh-1EwUvjsD4cYbAHNGHwTvDOyx5AKthQUP44ykPv7kjKGh3DWKySJvcs9tlUG87hlo7AvnMo9pwRS_Zz2CacQ-MKaXyDepk=.AQAB" diff --git a/test/web/streamer_test.exs b/test/web/streamer_test.exs index a0969e1d7..0a2e91298 100644 --- a/test/web/streamer_test.exs +++ b/test/web/streamer_test.exs @@ -5,10 +5,10 @@  defmodule Pleroma.Web.StreamerTest do    use Pleroma.DataCase -  alias Pleroma.Web.Streamer    alias Pleroma.List    alias Pleroma.User    alias Pleroma.Web.CommonAPI +  alias Pleroma.Web.Streamer    import Pleroma.Factory    test "it sends to public" do diff --git a/test/web/twitter_api/representers/activity_representer_test.exs b/test/web/twitter_api/representers/activity_representer_test.exs index 0e554623c..d154385a0 100644 --- a/test/web/twitter_api/representers/activity_representer_test.exs +++ b/test/web/twitter_api/representers/activity_representer_test.exs @@ -4,12 +4,12 @@  defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenterTest do    use Pleroma.DataCase -  alias Pleroma.User    alias Pleroma.Activity    alias Pleroma.Object +  alias Pleroma.User +  alias Pleroma.Web.ActivityPub.ActivityPub    alias Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter    alias Pleroma.Web.TwitterAPI.Representers.ObjectRepresenter -  alias Pleroma.Web.ActivityPub.ActivityPub    alias Pleroma.Web.TwitterAPI.UserView    import Pleroma.Factory @@ -101,10 +101,14 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenterTest do        recipients: to      } +    corndog_emojo = ~s(<img height="32px" width="32px" alt="2hu" title="2hu" src="corndog.png" />) +      expected_html = -      "<p>2hu <img height=\"32px\" width=\"32px\" alt=\"2hu\" title=\"2hu\" src=\"corndog.png\" /></p>alert('YAY')Some <img height=\"32px\" width=\"32px\" alt=\"2hu\" title=\"2hu\" src=\"corndog.png\" /> content mentioning <a href=\"#{ -        mentioned_user.ap_id -      }\">@shp</a>" +      ~s(<p>2hu ) <> +        corndog_emojo <> +        ~s(</p>alert\('YAY'\)Some ) <> +        corndog_emojo <> +        ~s( content mentioning <a href=") <> mentioned_user.ap_id <> ~s(">@shp</a>)      expected_status = %{        "id" => activity.id, diff --git a/test/web/twitter_api/twitter_api_controller_test.exs b/test/web/twitter_api/twitter_api_controller_test.exs index ce0812308..1b810c9a0 100644 --- a/test/web/twitter_api/twitter_api_controller_test.exs +++ b/test/web/twitter_api/twitter_api_controller_test.exs @@ -4,23 +4,23 @@  defmodule Pleroma.Web.TwitterAPI.ControllerTest do    use Pleroma.Web.ConnCase -  alias Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter +  alias Comeonin.Pbkdf2 +  alias Ecto.Changeset +  alias Pleroma.Activity    alias Pleroma.Builders.ActivityBuilder    alias Pleroma.Builders.UserBuilder +  alias Pleroma.Notification +  alias Pleroma.Object    alias Pleroma.Repo -  alias Pleroma.Activity    alias Pleroma.User -  alias Pleroma.Object -  alias Pleroma.Notification    alias Pleroma.Web.ActivityPub.ActivityPub +  alias Pleroma.Web.CommonAPI    alias Pleroma.Web.OAuth.Token    alias Pleroma.Web.TwitterAPI.Controller -  alias Pleroma.Web.TwitterAPI.UserView    alias Pleroma.Web.TwitterAPI.NotificationView -  alias Pleroma.Web.CommonAPI +  alias Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter    alias Pleroma.Web.TwitterAPI.TwitterAPI -  alias Comeonin.Pbkdf2 -  alias Ecto.Changeset +  alias Pleroma.Web.TwitterAPI.UserView    import Pleroma.Factory    import Mock @@ -490,7 +490,7 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do        response = json_response(conn, 200) -      assert length(response) == 0 +      assert Enum.empty?(response)      end    end diff --git a/test/web/twitter_api/twitter_api_test.exs b/test/web/twitter_api/twitter_api_test.exs index aa2a4d650..c8dd3fd7a 100644 --- a/test/web/twitter_api/twitter_api_test.exs +++ b/test/web/twitter_api/twitter_api_test.exs @@ -4,15 +4,15 @@  defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do    use Pleroma.DataCase -  alias Pleroma.Web.TwitterAPI.TwitterAPI -  alias Pleroma.Web.TwitterAPI.UserView    alias Pleroma.Activity -  alias Pleroma.User    alias Pleroma.Object    alias Pleroma.Repo +  alias Pleroma.User    alias Pleroma.UserInviteToken    alias Pleroma.Web.ActivityPub.ActivityPub    alias Pleroma.Web.TwitterAPI.ActivityView +  alias Pleroma.Web.TwitterAPI.TwitterAPI +  alias Pleroma.Web.TwitterAPI.UserView    import Pleroma.Factory @@ -472,6 +472,7 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do        # Also fetches the feed.        # assert Activity.get_create_by_object_ap_id("tag:mastodon.social,2017-04-05:objectId=1641750:objectType=Status") +      # credo:disable-for-previous-line Credo.Check.Readability.MaxLineLength      end    end  end diff --git a/test/web/twitter_api/views/activity_view_test.exs b/test/web/twitter_api/views/activity_view_test.exs index 0a5384f34..6f0786b1c 100644 --- a/test/web/twitter_api/views/activity_view_test.exs +++ b/test/web/twitter_api/views/activity_view_test.exs @@ -5,15 +5,15 @@  defmodule Pleroma.Web.TwitterAPI.ActivityViewTest do    use Pleroma.DataCase +  alias Pleroma.Activity +  alias Pleroma.Repo +  alias Pleroma.User +  alias Pleroma.Web.ActivityPub.ActivityPub    alias Pleroma.Web.CommonAPI    alias Pleroma.Web.CommonAPI.Utils    alias Pleroma.Web.TwitterAPI.ActivityView -  alias Pleroma.Web.TwitterAPI.UserView    alias Pleroma.Web.TwitterAPI.TwitterAPI -  alias Pleroma.Repo -  alias Pleroma.Activity -  alias Pleroma.User -  alias Pleroma.Web.ActivityPub.ActivityPub +  alias Pleroma.Web.TwitterAPI.UserView    import Pleroma.Factory    import Tesla.Mock diff --git a/test/web/twitter_api/views/notification_view_test.exs b/test/web/twitter_api/views/notification_view_test.exs index 3a67f7292..6baeeaf63 100644 --- a/test/web/twitter_api/views/notification_view_test.exs +++ b/test/web/twitter_api/views/notification_view_test.exs @@ -5,14 +5,14 @@  defmodule Pleroma.Web.TwitterAPI.NotificationViewTest do    use Pleroma.DataCase -  alias Pleroma.User    alias Pleroma.Notification -  alias Pleroma.Web.TwitterAPI.TwitterAPI +  alias Pleroma.User +  alias Pleroma.Web.ActivityPub.ActivityPub +  alias Pleroma.Web.CommonAPI.Utils +  alias Pleroma.Web.TwitterAPI.ActivityView    alias Pleroma.Web.TwitterAPI.NotificationView +  alias Pleroma.Web.TwitterAPI.TwitterAPI    alias Pleroma.Web.TwitterAPI.UserView -  alias Pleroma.Web.TwitterAPI.ActivityView -  alias Pleroma.Web.CommonAPI.Utils -  alias Pleroma.Web.ActivityPub.ActivityPub    import Pleroma.Factory diff --git a/test/web/twitter_api/views/user_view_test.exs b/test/web/twitter_api/views/user_view_test.exs index 114f24a1c..4e7f94795 100644 --- a/test/web/twitter_api/views/user_view_test.exs +++ b/test/web/twitter_api/views/user_view_test.exs @@ -6,8 +6,8 @@ defmodule Pleroma.Web.TwitterAPI.UserViewTest do    use Pleroma.DataCase    alias Pleroma.User -  alias Pleroma.Web.TwitterAPI.UserView    alias Pleroma.Web.CommonAPI.Utils +  alias Pleroma.Web.TwitterAPI.UserView    import Pleroma.Factory diff --git a/test/web/websub/websub_controller_test.exs b/test/web/websub/websub_controller_test.exs index 87b01d89b..1e69ed01a 100644 --- a/test/web/websub/websub_controller_test.exs +++ b/test/web/websub/websub_controller_test.exs @@ -5,10 +5,10 @@  defmodule Pleroma.Web.Websub.WebsubControllerTest do    use Pleroma.Web.ConnCase    import Pleroma.Factory -  alias Pleroma.Web.Websub.WebsubClientSubscription    alias Pleroma.Activity    alias Pleroma.Repo    alias Pleroma.Web.Websub +  alias Pleroma.Web.Websub.WebsubClientSubscription    test "websub subscription request", %{conn: conn} do      user = insert(:user) diff --git a/test/web/websub/websub_test.exs b/test/web/websub/websub_test.exs index 9a9b9df02..74386d7db 100644 --- a/test/web/websub/websub_test.exs +++ b/test/web/websub/websub_test.exs @@ -4,11 +4,13 @@  defmodule Pleroma.Web.WebsubTest do    use Pleroma.DataCase + +  alias Pleroma.Web.Router.Helpers    alias Pleroma.Web.Websub -  alias Pleroma.Web.Websub.WebsubServerSubscription    alias Pleroma.Web.Websub.WebsubClientSubscription +  alias Pleroma.Web.Websub.WebsubServerSubscription +    import Pleroma.Factory -  alias Pleroma.Web.Router.Helpers    import Tesla.Mock    setup do  | 
