Add test for help/test resource
This commit is contained in:
parent
9383c0aada
commit
59a406d94c
@ -21,6 +21,7 @@ defmodule Pleroma.Web.Router do
|
|||||||
|
|
||||||
scope "/api", Pleroma.Web do
|
scope "/api", Pleroma.Web do
|
||||||
pipe_through :api
|
pipe_through :api
|
||||||
|
|
||||||
get "/help/test", TwitterAPI.Controller, :help_test
|
get "/help/test", TwitterAPI.Controller, :help_test
|
||||||
get "/statuses/public_timeline", TwitterAPI.Controller, :public_timeline
|
get "/statuses/public_timeline", TwitterAPI.Controller, :public_timeline
|
||||||
get "/statuses/public_and_external_timeline", TwitterAPI.Controller, :public_timeline
|
get "/statuses/public_and_external_timeline", TwitterAPI.Controller, :public_timeline
|
||||||
|
@ -154,6 +154,13 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe "GET /help/test.json" do
|
||||||
|
test "returns \"ok\"", %{conn: conn} do
|
||||||
|
conn = get conn, "/api/help/test.json"
|
||||||
|
assert json_response(conn, 200) == "ok"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
defp valid_user(_context) do
|
defp valid_user(_context) do
|
||||||
{ :ok, user } = UserBuilder.insert(%{nickname: "lambda", ap_id: "lambda"})
|
{ :ok, user } = UserBuilder.insert(%{nickname: "lambda", ap_id: "lambda"})
|
||||||
[user: user]
|
[user: user]
|
||||||
|
Loading…
Reference in New Issue
Block a user