1 defmodule Pleroma.BBS.HandlerTest do
3 alias Pleroma.BBS.Handler
4 alias Pleroma.Web.CommonAPI
7 import ExUnit.CaptureIO
10 test "getting the home timeline" do
12 followed = insert(:user)
14 {:ok, user} = User.follow(user, followed)
16 {:ok, _first} = CommonAPI.post(user, %{"status" => "hey"})
17 {:ok, _second} = CommonAPI.post(followed, %{"status" => "hello"})
21 Handler.handle_command(%{user: user}, "home")
24 assert output =~ user.nickname
25 assert output =~ followed.nickname
27 assert output =~ "hey"
28 assert output =~ "hello"