aboutsummaryrefslogtreecommitdiff
path: root/test/web/twitter_api/twitter_api_controller_test.exs
diff options
context:
space:
mode:
authorkaniini <ariadne@dereferenced.org>2019-07-16 21:44:50 +0000
committerkaniini <ariadne@dereferenced.org>2019-07-16 21:44:50 +0000
commit0bbc0f0cf4ee87e8ac5995818c8049bf86e848cd (patch)
tree1740bc35a064b2eb6a7e8beed0796d1ab7192a89 /test/web/twitter_api/twitter_api_controller_test.exs
parent33fbb638cd815037741be25d0e47c3d16cc96971 (diff)
parent10f82c88b88fa4d26f6fa57f9cf36439012b8d0c (diff)
downloadpleroma-0bbc0f0cf4ee87e8ac5995818c8049bf86e848cd.tar.gz
Merge branch 'feature/1078-password-reset' into 'develop'
Feature/1078 password reset Closes #1078 See merge request pleroma/pleroma!1431
Diffstat (limited to 'test/web/twitter_api/twitter_api_controller_test.exs')
-rw-r--r--test/web/twitter_api/twitter_api_controller_test.exs10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/web/twitter_api/twitter_api_controller_test.exs b/test/web/twitter_api/twitter_api_controller_test.exs
index de6177575..622bf510e 100644
--- a/test/web/twitter_api/twitter_api_controller_test.exs
+++ b/test/web/twitter_api/twitter_api_controller_test.exs
@@ -1116,15 +1116,17 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do
describe "POST /api/account/password_reset, with invalid parameters" do
setup [:valid_user]
- test "it returns 500 when user is not found", %{conn: conn, user: user} do
+ test "it returns 404 when user is not found", %{conn: conn, user: user} do
conn = post(conn, "/api/account/password_reset?email=nonexisting_#{user.email}")
- assert json_response(conn, :internal_server_error)
+ assert conn.status == 404
+ refute conn.resp_body
end
- test "it returns 500 when user is not local", %{conn: conn, user: user} do
+ test "it returns 400 when user is not local", %{conn: conn, user: user} do
{:ok, user} = Repo.update(Changeset.change(user, local: false))
conn = post(conn, "/api/account/password_reset?email=#{user.email}")
- assert json_response(conn, :internal_server_error)
+ assert conn.status == 400
+ refute conn.resp_body
end
end