Add test for unmarshaling object without type
Fix existing tests
This commit is contained in:
parent
727077a035
commit
3cc5090015
5
tests/mocks/object_no_type.json
Normal file
5
tests/mocks/object_no_type.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"@context": "https://www.w3.org/ns/activitystreams",
|
||||
"id": "http://www.test.example/object/1",
|
||||
"name": "A Simple, non-specific object without a type"
|
||||
}
|
|
@ -12,9 +12,9 @@
|
|||
"content": "Example content!",
|
||||
"url": "http://example.com/53c6fb47",
|
||||
"mediaType": "text/markdown",
|
||||
"published": "2018-07-05T16:46:44.00000UTC",
|
||||
"published": "2018-07-05T16:46:44.00000Z",
|
||||
"generator": "http://example.com",
|
||||
"attributedTo": "http://example.com/account/alice"
|
||||
"attributedTo": "http://example.com/accounts/alice"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
"url": "http://example.com/outbox?page=2",
|
||||
"totalItems": 1,
|
||||
"partOf": "http://example.com/outbox",
|
||||
"current": "http://example.com/outbox?page=1",
|
||||
"current": "http://example.com/outbox?page=2",
|
||||
"next": "http://example.com/outbox?page=3",
|
||||
"prev" : "http://example.com/outbox?page=1",
|
||||
"startIndex": "100",
|
||||
"startIndex": 100,
|
||||
"orderedItems": [
|
||||
{
|
||||
"id": "http://example.com/outbox/53c6fb47",
|
||||
|
@ -17,9 +17,9 @@
|
|||
"content": "Example content!",
|
||||
"url": "http://example.com/53c6fb47",
|
||||
"mediaType": "text/markdown",
|
||||
"published": "2018-07-05T16:46:44.00000UTC",
|
||||
"published": "2018-07-05T16:46:44.00000Z",
|
||||
"generator": "http://example.com",
|
||||
"attributedTo": "http://example.com/account/alice"
|
||||
"attributedTo": "http://example.com/accounts/alice"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Reference in a new issue