diff options
Diffstat (limited to 'test/web')
| -rw-r--r-- | test/web/feed/tag_controller_test.exs | 31 | ||||
| -rw-r--r-- | test/web/feed/user_controller_test.exs (renamed from test/web/feed/feed_controller_test.exs) | 2 | 
2 files changed, 32 insertions, 1 deletions
diff --git a/test/web/feed/tag_controller_test.exs b/test/web/feed/tag_controller_test.exs new file mode 100644 index 000000000..82115f811 --- /dev/null +++ b/test/web/feed/tag_controller_test.exs @@ -0,0 +1,31 @@ +# Pleroma: A lightweight social networking server +# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/> +# SPDX-License-Identifier: AGPL-3.0-only + +defmodule Pleroma.Web.Feed.TagControllerTest do +  use Pleroma.Web.ConnCase + +  import Pleroma.Factory + +  clear_config([:feed]) + +  test "gets a feed", %{conn: conn} do +    Pleroma.Config.put( +      [:feed, :post_title], +      %{max_length: 10, omission: "..."} +    ) + +    user = insert(:user) +    {:ok, _activity1} = Pleroma.Web.CommonAPI.post(user, %{"status" => "yeah #PleromaArt"}) + +    {:ok, _activity2} = +      Pleroma.Web.CommonAPI.post(user, %{"status" => "42 This is :moominmamma #PleromaArt"}) + +    {:ok, _activity3} = Pleroma.Web.CommonAPI.post(user, %{"status" => "This is :moominmamma"}) + +    assert conn +           |> put_req_header("content-type", "application/atom+xml") +           |> get("/tags/pleromaart.rss") +           |> response(200) +  end +end diff --git a/test/web/feed/feed_controller_test.exs b/test/web/feed/user_controller_test.exs index 6f61acf43..e4386ff2c 100644 --- a/test/web/feed/feed_controller_test.exs +++ b/test/web/feed/user_controller_test.exs @@ -2,7 +2,7 @@  # Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>  # SPDX-License-Identifier: AGPL-3.0-only -defmodule Pleroma.Web.Feed.FeedControllerTest do +defmodule Pleroma.Web.Feed.UserControllerTest do    use Pleroma.Web.ConnCase    import Pleroma.Factory  | 
