Add twkn timeline.
This commit is contained in:
parent
6dd8335477
commit
32a95d73da
5 changed files with 35 additions and 2 deletions
|
|
@ -73,8 +73,9 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
|
|||
assert Enum.member?(get_in(reply.data, ["to"]), "some_cool_id")
|
||||
end
|
||||
|
||||
test "fetch public statuses" do
|
||||
test "fetch public statuses, excluding remote ones." do
|
||||
%{ public: activity, user: user } = ActivityBuilder.public_and_non_public
|
||||
insert(:note_activity, %{local: false})
|
||||
|
||||
follower = insert(:user, following: [User.ap_followers(user)])
|
||||
|
||||
|
|
@ -84,6 +85,18 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
|
|||
assert Enum.at(statuses, 0) == ActivityRepresenter.to_map(activity, %{user: user, for: follower})
|
||||
end
|
||||
|
||||
test "fetch whole known network statuses" do
|
||||
%{ public: activity, user: user } = ActivityBuilder.public_and_non_public
|
||||
insert(:note_activity, %{local: false})
|
||||
|
||||
follower = insert(:user, following: [User.ap_followers(user)])
|
||||
|
||||
statuses = TwitterAPI.fetch_public_and_external_statuses(follower)
|
||||
|
||||
assert length(statuses) == 2
|
||||
assert Enum.at(statuses, 0) == ActivityRepresenter.to_map(activity, %{user: user, for: follower})
|
||||
end
|
||||
|
||||
test "fetch friends' statuses" do
|
||||
user = insert(:user, %{following: ["someguy/followers"]})
|
||||
{:ok, activity} = ActivityBuilder.insert(%{"to" => ["someguy/followers"]})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue