Merge branch 'develop' into feature/database-compaction

This commit is contained in:
rinpatch 2019-04-17 12:22:32 +03:00
commit 627e5a0a49
1271 changed files with 42114 additions and 70683 deletions

View file

@ -1,7 +1,12 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.ObjectTest do
use Pleroma.DataCase
import Pleroma.Factory
alias Pleroma.{Repo, Object}
alias Pleroma.Object
alias Pleroma.Repo
test "returns an object by it's AP id" do
object = insert(:note)
@ -32,6 +37,8 @@ defmodule Pleroma.ObjectTest do
found_object = Object.get_by_ap_id(object.data["id"])
refute object == found_object
assert found_object.data["type"] == "Tombstone"
end
test "ensures cache is cleared for the object" do
@ -47,6 +54,8 @@ defmodule Pleroma.ObjectTest do
cached_object = Object.get_cached_by_ap_id(object.data["id"])
refute object == cached_object
assert cached_object.data["type"] == "Tombstone"
end
end