1 defmodule Pleroma.ObjectTest do
4 alias Pleroma.{Repo, Object}
6 test "returns an object by it's AP id" do
8 found_object = Object.get_by_ap_id(object.data["id"])
10 assert object == found_object
13 describe "generic changeset" do
14 test "it ensures uniqueness of the id" do
15 object = insert(:note)
16 cs = Object.change(%Object{}, %{data: %{id: object.data["id"]}})
19 {:error, _result} = Repo.insert(cs)