Fix bookmarks depending on embeded object and move checking if the
status is bookmarked to SQL
This commit is contained in:
parent
002ea343f8
commit
c3e9fcf098
5 changed files with 54 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue