[#1304] Moved all non-mutes / non-blocks fields from User.Info to User. WIP.
This commit is contained in:
parent
e3b4a3e96b
commit
10ff01acd9
88 changed files with 1069 additions and 1170 deletions
|
|
@ -59,7 +59,7 @@ defmodule Pleroma.Web.TwitterAPI.PasswordControllerTest do
|
|||
end
|
||||
|
||||
test "it sets password_reset_pending to false", %{conn: conn} do
|
||||
user = insert(:user, info: %{password_reset_pending: true})
|
||||
user = insert(:user, password_reset_pending: true)
|
||||
|
||||
{:ok, token} = PasswordResetToken.create_token(user)
|
||||
{:ok, _access_token} = Token.create_token(insert(:oauth_app), user, %{})
|
||||
|
|
@ -75,7 +75,7 @@ defmodule Pleroma.Web.TwitterAPI.PasswordControllerTest do
|
|||
|> post("/api/pleroma/password_reset", %{data: params})
|
||||
|> html_response(:ok)
|
||||
|
||||
assert User.get_by_id(user.id).info.password_reset_pending == false
|
||||
assert User.get_by_id(user.id).password_reset_pending == false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
|
|||
{:ok, user} = TwitterAPI.register_user(data)
|
||||
ObanHelpers.perform_all()
|
||||
|
||||
assert user.info.confirmation_pending
|
||||
assert user.confirmation_pending
|
||||
|
||||
email = Pleroma.Emails.UserEmail.account_confirmation_email(user)
|
||||
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do
|
|||
"follows" => true,
|
||||
"non_follows" => true,
|
||||
"non_followers" => true
|
||||
} == user.info.notification_settings
|
||||
} == user.notification_settings
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -370,7 +370,7 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do
|
|||
end
|
||||
|
||||
test "returns error when user is deactivated", %{conn: conn} do
|
||||
user = insert(:user, info: %{deactivated: true})
|
||||
user = insert(:user, deactivated: true)
|
||||
user2 = insert(:user)
|
||||
|
||||
response =
|
||||
|
|
@ -568,7 +568,7 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do
|
|||
|
||||
user = User.get_cached_by_id(user.id)
|
||||
|
||||
assert user.info.deactivated == true
|
||||
assert user.deactivated == true
|
||||
end
|
||||
|
||||
test "it returns returns when password invalid", %{conn: conn} do
|
||||
|
|
@ -583,7 +583,7 @@ defmodule Pleroma.Web.TwitterAPI.UtilControllerTest do
|
|||
assert response == %{"error" => "Invalid password."}
|
||||
user = User.get_cached_by_id(user.id)
|
||||
|
||||
refute user.info.deactivated
|
||||
refute user.deactivated
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue