Merge branch 'dokku' into 'develop'
[akkoma] / test / bookmark_test.exs
index 3be148023eb9079539b75f13b7a4ce1e50a4afc1..b81c102eff87084d9ede55b2c12ddf9944bdd340 100644 (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