From 18a4cbb244dbc188f5a391626fb98e3a53571318 Mon Sep 17 00:00:00 2001 From: Maxim Filippov Date: Mon, 24 Dec 2018 20:09:18 +0300 Subject: [PATCH] Capitalize "tombstone" --- lib/pleroma/object.ex | 2 +- test/activity_test.exs | 4 ++-- test/user_test.exs | 2 +- test/web/activity_pub/activity_pub_test.exs | 2 +- test/web/activity_pub/transmogrifier_test.exs | 2 +- test/web/mastodon_api/mastodon_api_controller_test.exs | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/pleroma/object.ex b/lib/pleroma/object.ex index 436cf6d5d..31f206c39 100644 --- a/lib/pleroma/object.ex +++ b/lib/pleroma/object.ex @@ -65,7 +65,7 @@ def context_mapping(context) do def get_tombstone(%Object{data: data}, deleted \\ DateTime.utc_now()) do %{ id: data["id"], - type: "tombstone", + type: "Tombstone", deleted: deleted } end diff --git a/test/activity_test.exs b/test/activity_test.exs index 87c9ddc50..c47fe39da 100644 --- a/test/activity_test.exs +++ b/test/activity_test.exs @@ -33,7 +33,7 @@ test "returns tombstone" do assert Pleroma.Activity.get_tombstone(activity, deleted) == %{ id: activity.data["object"]["id"], context: activity.data["context"], - type: "tombstone", + type: "Tombstone", published: activity.data["published"], deleted: deleted } @@ -43,7 +43,7 @@ test "swaps data with tombstone" do activity = insert(:note_activity) {:ok, deleted} = Pleroma.Activity.swap_data_with_tombstone(activity) - assert deleted.data.type == "tombstone" + assert deleted.data.type == "Tombstone" found_activity = Repo.get(Activity, activity.id) diff --git a/test/user_test.exs b/test/user_test.exs index 43a3687ec..f7a003c28 100644 --- a/test/user_test.exs +++ b/test/user_test.exs @@ -625,7 +625,7 @@ test ".delete deactivates a user, all follow relationships and all create activi # TODO: Remove favorites, repeats, delete activities. - assert Repo.get(Activity, activity.id).data["type"] == "tombstone" + assert Repo.get(Activity, activity.id).data["type"] == "Tombstone" end test "get_public_key_for_ap_id fetches a user that's not in the db" do diff --git a/test/web/activity_pub/activity_pub_test.exs b/test/web/activity_pub/activity_pub_test.exs index 95731a868..4d16a87e2 100644 --- a/test/web/activity_pub/activity_pub_test.exs +++ b/test/web/activity_pub/activity_pub_test.exs @@ -478,7 +478,7 @@ test "it creates a delete activity and deletes the original object" do assert Repo.get(Activity, delete.id) != nil - assert Repo.get(Object, object.id).data["type"] == "tombstone" + assert Repo.get(Object, object.id).data["type"] == "Tombstone" end end diff --git a/test/web/activity_pub/transmogrifier_test.exs b/test/web/activity_pub/transmogrifier_test.exs index 18a5ad3d0..8ab240dff 100644 --- a/test/web/activity_pub/transmogrifier_test.exs +++ b/test/web/activity_pub/transmogrifier_test.exs @@ -363,7 +363,7 @@ test "it works for incoming deletes" do {:ok, %Activity{local: false}} = Transmogrifier.handle_incoming(data) - assert Repo.get(Activity, activity.id).data["type"] == "tombstone" + assert Repo.get(Activity, activity.id).data["type"] == "Tombstone" end test "it fails for incoming deletes with spoofed origin" do diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index 6c6cc2a00..f1baa9953 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -292,7 +292,7 @@ test "when you created it", %{conn: conn} do assert %{} = json_response(conn, 200) - assert Repo.get(Activity, activity.id).data["type"] == "tombstone" + assert Repo.get(Activity, activity.id).data["type"] == "Tombstone" end test "when you didn't create it", %{conn: conn} do