projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'feature/deps-migration' into 'develop'
[akkoma]
/
test
/
web
/
twitter_api
/
twitter_api_controller_test.exs
diff --git
a/test/web/twitter_api/twitter_api_controller_test.exs
b/test/web/twitter_api/twitter_api_controller_test.exs
index a9350d1897a58abfe132f6858a55c4e132c334e7..02aba0bc8859ba105ce73d919275667f6b69955a 100644
(file)
--- a/
test/web/twitter_api/twitter_api_controller_test.exs
+++ b/
test/web/twitter_api/twitter_api_controller_test.exs
@@
-801,11
+801,11
@@
defmodule Pleroma.Web.TwitterAPI.ControllerTest do
assert user.bio == "Hello,<br>World! I<br> am a test."
end
assert user.bio == "Hello,<br>World! I<br> am a test."
end
- describe "POST /api/
account
/delete_account" do
+ describe "POST /api/
pleroma
/delete_account" do
setup [:valid_user]
test "without credentials", %{conn: conn} do
setup [:valid_user]
test "without credentials", %{conn: conn} do
- conn = post(conn, "/api/
account
/delete_account")
+ conn = post(conn, "/api/
pleroma
/delete_account")
assert json_response(conn, 403) == %{"error" => "Invalid credentials."}
end
assert json_response(conn, 403) == %{"error" => "Invalid credentials."}
end
@@
-813,27
+813,18
@@
defmodule Pleroma.Web.TwitterAPI.ControllerTest do
conn =
conn
|> with_credentials(current_user.nickname, "test")
conn =
conn
|> with_credentials(current_user.nickname, "test")
- |> post("/api/account/delete_account", %{
- "password" => ""
- })
+ |> post("/api/pleroma/delete_account", %{"password" => "hi"})
- assert json_response(conn, 403) == %{
- "error" => "Invalid password.",
- "request" => "/api/account/delete_account"
- }
+ assert json_response(conn, 200) == %{"error" => "Invalid password."}
end
test "with credentials and valid password", %{conn: conn, user: current_user} do
conn =
conn
|> with_credentials(current_user.nickname, "test")
end
test "with credentials and valid password", %{conn: conn, user: current_user} do
conn =
conn
|> with_credentials(current_user.nickname, "test")
- |> post("/api/account/delete_account", %{
- "password" => "test"
- })
+ |> post("/api/pleroma/delete_account", %{"password" => "test"})
assert json_response(conn, 200) == %{"status" => "success"}
assert json_response(conn, 200) == %{"status" => "success"}
- fetched_user = Repo.get(User, current_user.id)
- assert fetched_user.info == %{"deactivated" => true}
end
end
end
end
end
end