Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
18a4cbb2
Commit
18a4cbb2
authored
Dec 24, 2018
by
Maxim Filippov
🌚
Browse files
Capitalize "tombstone"
parent
0f412cf6
Changes
6
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/object.ex
View file @
18a4cbb2
...
...
@@ -65,7 +65,7 @@ def context_mapping(context) do
def
get_tombstone
(%
Object
{
data:
data
},
deleted
\\
DateTime
.
utc_now
())
do
%{
id:
data
[
"id"
],
type:
"
t
ombstone"
,
type:
"
T
ombstone"
,
deleted:
deleted
}
end
...
...
test/activity_test.exs
View file @
18a4cbb2
...
...
@@ -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:
"
t
ombstone"
,
type:
"
T
ombstone"
,
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
==
"
t
ombstone"
assert
deleted
.
data
.
type
==
"
T
ombstone"
found_activity
=
Repo
.
get
(
Activity
,
activity
.
id
)
...
...
test/user_test.exs
View file @
18a4cbb2
...
...
@@ -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"
]
==
"
t
ombstone"
assert
Repo
.
get
(
Activity
,
activity
.
id
)
.
data
[
"type"
]
==
"
T
ombstone"
end
test
"get_public_key_for_ap_id fetches a user that's not in the db"
do
...
...
test/web/activity_pub/activity_pub_test.exs
View file @
18a4cbb2
...
...
@@ -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"
]
==
"
t
ombstone"
assert
Repo
.
get
(
Object
,
object
.
id
)
.
data
[
"type"
]
==
"
T
ombstone"
end
end
...
...
test/web/activity_pub/transmogrifier_test.exs
View file @
18a4cbb2
...
...
@@ -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"
]
==
"
t
ombstone"
assert
Repo
.
get
(
Activity
,
activity
.
id
)
.
data
[
"type"
]
==
"
T
ombstone"
end
test
"it fails for incoming deletes with spoofed origin"
do
...
...
test/web/mastodon_api/mastodon_api_controller_test.exs
View file @
18a4cbb2
...
...
@@ -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"
]
==
"
t
ombstone"
assert
Repo
.
get
(
Activity
,
activity
.
id
)
.
data
[
"type"
]
==
"
T
ombstone"
end
test
"when you didn't create it"
,
%{
conn:
conn
}
do
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment