Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F7888961
object_test.exs
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
546 B
Referenced Files
None
Subscribers
None
object_test.exs
View Options
defmodule
Pleroma.ObjectTest
do
use
Pleroma.DataCase
import
Pleroma.Factory
alias
Pleroma
.
{
Repo
,
Object
}
test
"returns an object by it's AP id"
do
object
=
insert
(
:note
)
found_object
=
Object
.
get_by_ap_id
(
object
.
data
[
"id"
])
assert
object
==
found_object
end
describe
"generic changeset"
do
test
"it ensures uniqueness of the id"
do
object
=
insert
(
:note
)
cs
=
Object
.
change
(%
Object
{},
%{
data
:
%{
id
:
object
.
data
[
"id"
]}})
assert
cs
.
valid?
{
:error
,
result
}
=
Repo
.
insert
(
cs
)
end
end
end
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Oct 2, 2:15 AM (12 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
486908
Default Alt Text
object_test.exs (546 B)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment