Fix bookmarks depending on embeded object and move checking if the

status is bookmarked to SQL
This commit is contained in:
rinpatch 2019-04-27 23:06:46 +03:00
commit c3e9fcf098
5 changed files with 54 additions and 10 deletions

View file

@ -34,4 +34,19 @@ defmodule Pleroma.BookmarkTest do
{:ok, _deleted_bookmark} = Bookmark.destroy(user.id, activity.id)
end
end
describe "get/2" do
test "gets a bookmark" do
user = insert(:user)
{:ok, activity} =
CommonAPI.post(user, %{
"status" =>
"Scientists Discover The Secret Behind Tenshi Eating A Corndog Being So Cute Science Daily"
})
{:ok, bookmark} = Bookmark.create(user.id, activity.id)
assert bookmark == Bookmark.get(user.id, activity.id)
end
end
end