+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
defmodule Pleroma.BookmarkTest do
use Pleroma.DataCase
import Pleroma.Factory
{: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