Change user.locked field to user.is_locked

This commit is contained in:
Mark Felder 2020-10-13 09:31:13 -05:00
commit 9968b7efed
28 changed files with 89 additions and 74 deletions

View file

@ -102,7 +102,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController.UpdateCredentialsTest do
end
test "updates the user's locking status", %{conn: conn} do
conn = patch(conn, "/api/v1/accounts/update_credentials", %{locked: "true"})
conn = patch(conn, "/api/v1/accounts/update_credentials", %{is_locked: "true"})
assert user_data = json_response_and_validate_schema(conn, 200)
assert user_data["locked"] == true

View file

@ -706,7 +706,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
end
test "cancelling follow request", %{conn: conn} do
%{id: other_user_id} = insert(:user, %{locked: true})
%{id: other_user_id} = insert(:user, %{is_locked: true})
assert %{"id" => ^other_user_id, "following" => false, "requested" => true} =
conn

View file

@ -12,7 +12,7 @@ defmodule Pleroma.Web.MastodonAPI.FollowRequestControllerTest do
describe "locked accounts" do
setup do
user = insert(:user, locked: true)
user = insert(:user, is_locked: true)
%{conn: conn} = oauth_access(["follow"], user: user)
%{user: user, conn: conn}
end