Return 404 if account to filter notifications from is not found

This commit is contained in:
Egor Kislitsyn 2019-12-19 20:45:44 +07:00
commit 34d85f8a54
No known key found for this signature in database
GPG key ID: 1B49CB15B71E7805
3 changed files with 23 additions and 9 deletions

View file

@ -478,11 +478,11 @@ defmodule Pleroma.Web.MastodonAPI.NotificationControllerTest do
|> get("/api/v1/notifications", %{account_id: account_id})
|> json_response(200)
assert [] =
assert %{"error" => "Account is not found"} =
conn
|> assign(:user, user)
|> get("/api/v1/notifications", %{account_id: "cofe"})
|> json_response(200)
|> json_response(404)
end
end