Merge branch 'features/glitch-soc-frontend' into 'develop'
Features/glitch soc frontend See merge request pleroma/pleroma!192
This commit is contained in:
commit
00d4333373
9 changed files with 162 additions and 11 deletions
|
|
@ -951,4 +951,31 @@ defmodule Pleroma.UserTest do
|
|||
assert expected_text == User.parse_bio(bio, user)
|
||||
end
|
||||
end
|
||||
|
||||
test "bookmarks" do
|
||||
user = insert(:user)
|
||||
|
||||
{:ok, activity1} =
|
||||
CommonAPI.post(user, %{
|
||||
"status" => "heweoo!"
|
||||
})
|
||||
|
||||
id1 = activity1.data["object"]["id"]
|
||||
|
||||
{:ok, activity2} =
|
||||
CommonAPI.post(user, %{
|
||||
"status" => "heweoo!"
|
||||
})
|
||||
|
||||
id2 = activity2.data["object"]["id"]
|
||||
|
||||
assert {:ok, user_state1} = User.bookmark(user, id1)
|
||||
assert user_state1.bookmarks == [id1]
|
||||
|
||||
assert {:ok, user_state2} = User.unbookmark(user, id1)
|
||||
assert user_state2.bookmarks == []
|
||||
|
||||
assert {:ok, user_state3} = User.bookmark(user, id2)
|
||||
assert user_state3.bookmarks == [id2]
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue