Add test for help/test resource

This commit is contained in:
dtluna 2017-04-10 16:00:57 +03:00
parent 9383c0aada
commit 59a406d94c
2 changed files with 8 additions and 0 deletions

View file

@ -21,6 +21,7 @@ defmodule Pleroma.Web.Router do
scope "/api", Pleroma.Web do
pipe_through :api
get "/help/test", TwitterAPI.Controller, :help_test
get "/statuses/public_timeline", TwitterAPI.Controller, :public_timeline
get "/statuses/public_and_external_timeline", TwitterAPI.Controller, :public_timeline

View file

@ -154,6 +154,13 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do
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
{ :ok, user } = UserBuilder.insert(%{nickname: "lambda", ap_id: "lambda"})
[user: user]