X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fpleroma%2Fweb%2Fpleroma_api%2Fcontrollers%2Faccount_controller_test.exs;h=89a2cf634d181d005b744e9cc3a88868e1673cd0;hb=07a48b9293e4046c50b5d424d60a1bf16c7cc198;hp=07909d48bd806f8c2c1b65e88cabe8563326f665;hpb=049ece1ef38f1aeb656a88ed1d15bf3d4a364e01;p=akkoma diff --git a/test/pleroma/web/pleroma_api/controllers/account_controller_test.exs b/test/pleroma/web/pleroma_api/controllers/account_controller_test.exs index 07909d48b..89a2cf634 100644 --- a/test/pleroma/web/pleroma_api/controllers/account_controller_test.exs +++ b/test/pleroma/web/pleroma_api/controllers/account_controller_test.exs @@ -1,5 +1,5 @@ # Pleroma: A lightweight social networking server -# Copyright © 2017-2020 Pleroma Authors +# Copyright © 2017-2021 Pleroma Authors # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Web.PleromaAPI.AccountControllerTest do @@ -17,10 +17,10 @@ defmodule Pleroma.Web.PleromaAPI.AccountControllerTest do setup do {:ok, user} = insert(:user) - |> User.confirmation_changeset(need_confirmation: true) + |> User.confirmation_changeset(set_confirmation: false) |> User.update_and_set_cache() - assert user.confirmation_pending + refute user.is_confirmed [user: user] end @@ -133,7 +133,7 @@ defmodule Pleroma.Web.PleromaAPI.AccountControllerTest do |> get("/api/v1/pleroma/accounts/#{user.id}/favourites") |> json_response_and_validate_schema(200) - assert length(response) == 0 + assert response == [] end test "does not return others' favorited DM when user is not one of recipients", %{ @@ -174,9 +174,7 @@ defmodule Pleroma.Web.PleromaAPI.AccountControllerTest do response = conn |> get( - "/api/v1/pleroma/accounts/#{user.id}/favourites?since_id=#{third_activity.id}&max_id=#{ - seventh_activity.id - }" + "/api/v1/pleroma/accounts/#{user.id}/favourites?since_id=#{third_activity.id}&max_id=#{seventh_activity.id}" ) |> json_response_and_validate_schema(:ok)