diff options
author | rinpatch <rinpatch@sdf.org> | 2019-06-01 16:29:58 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-06-01 16:29:58 +0300 |
commit | 65db5e9f528a3f8d8b3c81953fd160a6744dfffd (patch) | |
tree | 9da5234f8a9dd411b59e839eeb38254822939e2f /test/object | |
parent | 300d94c62829d0ec961f3ed6c0242dea102ab0ad (diff) | |
parent | f8d4c02431aa634dc74074b93d1cb522e47056ce (diff) | |
download | pleroma-65db5e9f528a3f8d8b3c81953fd160a6744dfffd.tar.gz |
Resolve merge conflicts
Diffstat (limited to 'test/object')
-rw-r--r-- | test/object/fetcher_test.exs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/object/fetcher_test.exs b/test/object/fetcher_test.exs index 72f616782..d604fd5f5 100644 --- a/test/object/fetcher_test.exs +++ b/test/object/fetcher_test.exs @@ -87,4 +87,23 @@ defmodule Pleroma.Object.FetcherTest do ) end end + + describe "pruning" do + test "it can refetch pruned objects" do + object_id = "http://mastodon.example.org/@admin/99541947525187367" + + {:ok, object} = Fetcher.fetch_object_from_id(object_id) + + assert object + + {:ok, _object} = Object.prune(object) + + refute Object.get_by_ap_id(object_id) + + {:ok, %Object{} = object_two} = Fetcher.fetch_object_from_id(object_id) + + assert object.data["id"] == object_two.data["id"] + assert object.id != object_two.id + end + end end |