Capitalize "tombstone"

This commit is contained in:
Maxim Filippov 2018-12-24 20:09:18 +03:00
parent 0f412cf6e6
commit 18a4cbb244
6 changed files with 7 additions and 7 deletions

View File

@ -65,7 +65,7 @@ def context_mapping(context) do
def get_tombstone(%Object{data: data}, deleted \\ DateTime.utc_now()) do def get_tombstone(%Object{data: data}, deleted \\ DateTime.utc_now()) do
%{ %{
id: data["id"], id: data["id"],
type: "tombstone", type: "Tombstone",
deleted: deleted deleted: deleted
} }
end end

View File

@ -33,7 +33,7 @@ test "returns tombstone" do
assert Pleroma.Activity.get_tombstone(activity, deleted) == %{ assert Pleroma.Activity.get_tombstone(activity, deleted) == %{
id: activity.data["object"]["id"], id: activity.data["object"]["id"],
context: activity.data["context"], context: activity.data["context"],
type: "tombstone", type: "Tombstone",
published: activity.data["published"], published: activity.data["published"],
deleted: deleted deleted: deleted
} }
@ -43,7 +43,7 @@ test "swaps data with tombstone" do
activity = insert(:note_activity) activity = insert(:note_activity)
{:ok, deleted} = Pleroma.Activity.swap_data_with_tombstone(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) found_activity = Repo.get(Activity, activity.id)

View File

@ -625,7 +625,7 @@ test ".delete deactivates a user, all follow relationships and all create activi
# TODO: Remove favorites, repeats, delete activities. # 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 end
test "get_public_key_for_ap_id fetches a user that's not in the db" do test "get_public_key_for_ap_id fetches a user that's not in the db" do

View File

@ -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(Activity, delete.id) != nil
assert Repo.get(Object, object.id).data["type"] == "tombstone" assert Repo.get(Object, object.id).data["type"] == "Tombstone"
end end
end end

View File

@ -363,7 +363,7 @@ test "it works for incoming deletes" do
{:ok, %Activity{local: false}} = Transmogrifier.handle_incoming(data) {: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 end
test "it fails for incoming deletes with spoofed origin" do test "it fails for incoming deletes with spoofed origin" do

View File

@ -292,7 +292,7 @@ test "when you created it", %{conn: conn} do
assert %{} = json_response(conn, 200) assert %{} = json_response(conn, 200)
assert Repo.get(Activity, activity.id).data["type"] == "tombstone" assert Repo.get(Activity, activity.id).data["type"] == "Tombstone"
end end
test "when you didn't create it", %{conn: conn} do test "when you didn't create it", %{conn: conn} do