Merge branch 'feature/list-streaming' into 'develop'
MastoAPI: Add streaming for lists. See merge request pleroma/pleroma!183
This commit is contained in:
commit
564c73ab24
6 changed files with 56 additions and 3 deletions
|
|
@ -74,4 +74,20 @@ defmodule Pleroma.ListTest do
|
|||
assert list_two in lists
|
||||
refute list_three in lists
|
||||
end
|
||||
|
||||
test "getting all lists the user is a member of" do
|
||||
user = insert(:user)
|
||||
other_user = insert(:user)
|
||||
{:ok, list_one} = Pleroma.List.create("title", user)
|
||||
{:ok, list_two} = Pleroma.List.create("other title", user)
|
||||
{:ok, list_three} = Pleroma.List.create("third title", other_user)
|
||||
{:ok, list_one} = Pleroma.List.follow(list_one, other_user)
|
||||
{:ok, list_two} = Pleroma.List.follow(list_two, other_user)
|
||||
{:ok, list_three} = Pleroma.List.follow(list_three, user)
|
||||
|
||||
lists = Pleroma.List.get_lists_from_activity(%Pleroma.Activity{actor: other_user.ap_id})
|
||||
assert list_one in lists
|
||||
assert list_two in lists
|
||||
refute list_three in lists
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue