projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'remotes/origin/develop' into feature/object-hashtags...
[akkoma]
/
test
/
pleroma
/
web
/
mastodon_api
/
controllers
/
account_controller_test.exs
diff --git
a/test/pleroma/web/mastodon_api/controllers/account_controller_test.exs
b/test/pleroma/web/mastodon_api/controllers/account_controller_test.exs
index cc7b3cf8b4b52ec6cdef92d7819ab6022870192b..b7a3edd4b2bf6222095642a103092edf2471c407 100644
(file)
--- a/
test/pleroma/web/mastodon_api/controllers/account_controller_test.exs
+++ b/
test/pleroma/web/mastodon_api/controllers/account_controller_test.exs
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-202
0
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-202
1
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
@@
-126,7
+126,7
@@
defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
end
test "returns 404 for deactivated user", %{conn: conn} do
end
test "returns 404 for deactivated user", %{conn: conn} do
- user = insert(:user,
deactivated: tru
e)
+ user = insert(:user,
is_active: fals
e)
assert %{"error" => "Can't find user"} =
conn
assert %{"error" => "Can't find user"} =
conn
@@
-256,7
+256,7
@@
defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
end
test "deactivated user", %{conn: conn} do
end
test "deactivated user", %{conn: conn} do
- user = insert(:user,
deactivated: tru
e)
+ user = insert(:user,
is_active: fals
e)
assert %{"error" => "Can't find user"} ==
conn
assert %{"error" => "Can't find user"} ==
conn
@@
-1007,7
+1007,7
@@
defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
assert %{"error" => "{\"email\":[\"Invalid email\"]}"} =
json_response_and_validate_schema(conn, 400)
assert %{"error" => "{\"email\":[\"Invalid email\"]}"} =
json_response_and_validate_schema(conn, 400)
-
Pleroma.Config.put
([User, :email_blacklist], [])
+
clear_config
([User, :email_blacklist], [])
conn =
build_conn()
conn =
build_conn()
@@
-1027,8
+1027,8
@@
defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
user = Repo.preload(token_from_db, :user).user
assert user
user = Repo.preload(token_from_db, :user).user
assert user
- refute user.confirmation_pending
- refute user.approval_pending
+ assert user.is_confirmed
+ assert user.is_approved
end
test "registers but does not log in with :account_activation_required", %{conn: conn} do
end
test "registers but does not log in with :account_activation_required", %{conn: conn} do
@@
-1088,7
+1088,7
@@
defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
refute response["token_type"]
user = Repo.get_by(User, email: "lain@example.org")
refute response["token_type"]
user = Repo.get_by(User, email: "lain@example.org")
- assert user.confirmation_pending
+ refute user.is_confirmed
end
test "registers but does not log in with :account_approval_required", %{conn: conn} do
end
test "registers but does not log in with :account_approval_required", %{conn: conn} do
@@
-1150,7
+1150,7
@@
defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
user = Repo.get_by(User, email: "lain@example.org")
user = Repo.get_by(User, email: "lain@example.org")
- assert user.approval_pending
+ refute user.is_approved
assert user.registration_reason == "I'm a cool dude, bro"
end
assert user.registration_reason == "I'm a cool dude, bro"
end