summaryrefslogtreecommitdiff
path: root/test/bookmark_test.exs
diff options
context:
space:
mode:
Diffstat (limited to 'test/bookmark_test.exs')
-rw-r--r--test/bookmark_test.exs15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/bookmark_test.exs b/test/bookmark_test.exs
index 3be148023..b81c102ef 100644
--- a/test/bookmark_test.exs
+++ b/test/bookmark_test.exs
@@ -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