init tag feed
This commit is contained in:
parent
67d8df04a4
commit
22fc271e23
11 changed files with 96 additions and 15 deletions
31
test/web/feed/tag_controller_test.exs
Normal file
31
test/web/feed/tag_controller_test.exs
Normal file
|
|
@ -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
|
||||
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue