projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mix format
[akkoma]
/
test
/
pleroma
/
web
/
twitter_api
/
password_controller_test.exs
diff --git
a/test/pleroma/web/twitter_api/password_controller_test.exs
b/test/pleroma/web/twitter_api/password_controller_test.exs
index 45ab10a8aa6742f3dda63d4b555124c526c9ad58..05c3561bf82a18bb2d50c5ce1906562d72c6eab4 100644
(file)
--- a/
test/pleroma/web/twitter_api/password_controller_test.exs
+++ b/
test/pleroma/web/twitter_api/password_controller_test.exs
@@
-14,11
+14,11
@@
defmodule Pleroma.Web.TwitterAPI.PasswordControllerTest do
import Pleroma.Factory
import Swoosh.TestAssertions
import Pleroma.Factory
import Swoosh.TestAssertions
- describe "GET /api/pleroma/password_reset/token" do
+ describe "GET /api/
v1/
pleroma/password_reset/token" do
test "it returns error when token invalid", %{conn: conn} do
response =
conn
test "it returns error when token invalid", %{conn: conn} do
response =
conn
- |> get("/api/pleroma/password_reset/token")
+ |> get("/api/
v1/
pleroma/password_reset/token")
|> html_response(:ok)
assert response =~ "<h2>Invalid Token</h2>"
|> html_response(:ok)
assert response =~ "<h2>Invalid Token</h2>"
@@
-30,7
+30,7
@@
defmodule Pleroma.Web.TwitterAPI.PasswordControllerTest do
response =
conn
response =
conn
- |> get("/api/pleroma/password_reset/#{token.token}")
+ |> get("/api/
v1/
pleroma/password_reset/#{token.token}")
|> html_response(:ok)
assert response =~ "<h2>Password Reset for #{user.nickname}</h2>"
|> html_response(:ok)
assert response =~ "<h2>Password Reset for #{user.nickname}</h2>"
@@
-45,14
+45,14
@@
defmodule Pleroma.Web.TwitterAPI.PasswordControllerTest do
response =
conn
response =
conn
- |> get("/api/pleroma/password_reset/#{token.token}")
+ |> get("/api/
v1/
pleroma/password_reset/#{token.token}")
|> html_response(:ok)
assert response =~ "<h2>Invalid Token</h2>"
end
end
|> html_response(:ok)
assert response =~ "<h2>Invalid Token</h2>"
end
end
- describe "POST /api/pleroma/password_reset" do
+ describe "POST /api/
v1/
pleroma/password_reset" do
test "it fails for an expired token", %{conn: conn} do
clear_config([:instance, :password_reset_token_validity], 0)
test "it fails for an expired token", %{conn: conn} do
clear_config([:instance, :password_reset_token_validity], 0)
@@
-70,7
+70,7
@@
defmodule Pleroma.Web.TwitterAPI.PasswordControllerTest do
response =
conn
|> assign(:user, user)
response =
conn
|> assign(:user, user)
- |> post("/api/pleroma/password_reset", %{data: params})
+ |> post("/api/
v1/
pleroma/password_reset", %{data: params})
|> html_response(:ok)
refute response =~ "<h2>Password changed!</h2>"
|> html_response(:ok)
refute response =~ "<h2>Password changed!</h2>"
@@
-90,7
+90,7
@@
defmodule Pleroma.Web.TwitterAPI.PasswordControllerTest do
response =
conn
|> assign(:user, user)
response =
conn
|> assign(:user, user)
- |> post("/api/pleroma/password_reset", %{data: params})
+ |> post("/api/
v1/
pleroma/password_reset", %{data: params})
|> html_response(:ok)
assert response =~ "<h2>Password changed!</h2>"
|> html_response(:ok)
assert response =~ "<h2>Password changed!</h2>"
@@
-114,7
+114,7
@@
defmodule Pleroma.Web.TwitterAPI.PasswordControllerTest do
conn
|> assign(:user, user)
conn
|> assign(:user, user)
- |> post("/api/pleroma/password_reset", %{data: params})
+ |> post("/api/
v1/
pleroma/password_reset", %{data: params})
|> html_response(:ok)
assert User.get_by_id(user.id).password_reset_pending == false
|> html_response(:ok)
assert User.get_by_id(user.id).password_reset_pending == false