From 59a406d94cbb1df2f3c7b6b7844f1141cc661f7c Mon Sep 17 00:00:00 2001 From: dtluna Date: Mon, 10 Apr 2017 16:00:57 +0300 Subject: [PATCH] Add test for help/test resource --- lib/pleroma/web/router.ex | 1 + test/web/twitter_api/twitter_api_controller_test.exs | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex index e52a95657..e37bd1f72 100644 --- a/lib/pleroma/web/router.ex +++ b/lib/pleroma/web/router.ex @@ -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 diff --git a/test/web/twitter_api/twitter_api_controller_test.exs b/test/web/twitter_api/twitter_api_controller_test.exs index 5aad12593..bead7a5a1 100644 --- a/test/web/twitter_api/twitter_api_controller_test.exs +++ b/test/web/twitter_api/twitter_api_controller_test.exs @@ -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] -- 2.45.2