summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api
diff options
context:
space:
mode:
authorkaniini <nenolod@gmail.com>2019-02-14 03:55:26 +0000
committerkaniini <nenolod@gmail.com>2019-02-14 03:55:26 +0000
commit19756d68f2b341deac0b630b8e0d351b6ad4b38f (patch)
tree5aa7585c9c825f4a2908344905499d76b2864b66 /test/web/mastodon_api
parent6652389e80b736fb64a8d08e2e5f50eb4de9c54b (diff)
parent74579115a73d697aed67abe2dc8ea1a664c89c5b (diff)
downloadpleroma-19756d68f2b341deac0b630b8e0d351b6ad4b38f.tar.gz
pleroma-19756d68f2b341deac0b630b8e0d351b6ad4b38f.zip
Merge branch 'fix/credo-issues-test' into 'develop'
Fix credo issues in ./test See merge request pleroma/pleroma!808
Diffstat (limited to 'test/web/mastodon_api')
-rw-r--r--test/web/mastodon_api/mastodon_api_controller_test.exs11
-rw-r--r--test/web/mastodon_api/status_view_test.exs3
2 files changed, 10 insertions, 4 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs
index 1a60ad8e6..26c9c25a6 100644
--- a/test/web/mastodon_api/mastodon_api_controller_test.exs
+++ b/test/web/mastodon_api/mastodon_api_controller_test.exs
@@ -6,8 +6,13 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
use Pleroma.Web.ConnCase
alias Pleroma.Web.TwitterAPI.TwitterAPI
- alias Pleroma.{Repo, User, Object, Activity, Notification}
- alias Pleroma.Web.{OStatus, CommonAPI}
+ alias Pleroma.Repo
+ alias Pleroma.User
+ alias Pleroma.Object
+ alias Pleroma.Activity
+ alias Pleroma.Notification
+ alias Pleroma.Web.OStatus
+ alias Pleroma.Web.CommonAPI
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.MastodonAPI.FilterView
alias Ecto.Changeset
@@ -31,7 +36,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
|> assign(:user, user)
|> get("/api/v1/timelines/home")
- assert length(json_response(conn, 200)) == 0
+ assert Enum.empty?(json_response(conn, 200))
{:ok, user} = User.follow(user, following)
diff --git a/test/web/mastodon_api/status_view_test.exs b/test/web/mastodon_api/status_view_test.exs
index 2106253f2..0dc9c538c 100644
--- a/test/web/mastodon_api/status_view_test.exs
+++ b/test/web/mastodon_api/status_view_test.exs
@@ -5,7 +5,8 @@
defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
use Pleroma.DataCase
- alias Pleroma.Web.MastodonAPI.{StatusView, AccountView}
+ alias Pleroma.Web.MastodonAPI.AccountView
+ alias Pleroma.Web.MastodonAPI.StatusView
alias Pleroma.User
alias Pleroma.Web.OStatus
alias Pleroma.Web.CommonAPI