mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Update test
This commit is contained in:
parent
d67fcffb02
commit
222dc3a192
1 changed files with 0 additions and 48 deletions
|
@ -53,22 +53,6 @@ class AnnounceTest extends TestCase
|
|||
'object' => 'https://example.org/p/bob/100000000000000',
|
||||
];
|
||||
|
||||
$this->invalidDate = [
|
||||
'@context' => 'https://www.w3.org/ns/activitystreams',
|
||||
'id' => 'https://example.org/users/alice/statuses/100000000000001/activity',
|
||||
'type' => 'Announce',
|
||||
'actor' => 'https://example.org/users/alice',
|
||||
'published' => '2018-12-31T23:59:59ZEZE',
|
||||
'to' => [
|
||||
'https://www.w3.org/ns/activitystreams#Public'
|
||||
],
|
||||
'cc' => [
|
||||
'https://example.org/users/bob',
|
||||
'https://example.org/users/alice/followers'
|
||||
],
|
||||
'object' => 'https://example.org/p/bob/100000000000000',
|
||||
];
|
||||
|
||||
$this->contextMissing = [
|
||||
'id' => 'https://example.org/users/alice/statuses/100000000000001/activity',
|
||||
'type' => 'Announce',
|
||||
|
@ -84,25 +68,6 @@ class AnnounceTest extends TestCase
|
|||
'object' => 'https://example.org/p/bob/100000000000000',
|
||||
];
|
||||
|
||||
$this->audienceMissing = [
|
||||
'id' => 'https://example.org/users/alice/statuses/100000000000001/activity',
|
||||
'type' => 'Announce',
|
||||
'actor' => 'https://example.org/users/alice',
|
||||
'published' => '2018-12-31T23:59:59Z',
|
||||
'object' => 'https://example.org/p/bob/100000000000000',
|
||||
];
|
||||
|
||||
$this->audienceMissing2 = [
|
||||
'@context' => 'https://www.w3.org/ns/activitystreams',
|
||||
'id' => 'https://example.org/users/alice/statuses/100000000000001/activity',
|
||||
'type' => 'Announce',
|
||||
'actor' => 'https://example.org/users/alice',
|
||||
'published' => '2018-12-31T23:59:59Z',
|
||||
'to' => null,
|
||||
'cc' => null,
|
||||
'object' => 'https://example.org/p/bob/100000000000000',
|
||||
];
|
||||
|
||||
$this->invalidActor = [
|
||||
'@context' => 'https://www.w3.org/ns/activitystreams',
|
||||
'id' => 'https://example.org/users/alice/statuses/100000000000001/activity',
|
||||
|
@ -185,25 +150,12 @@ class AnnounceTest extends TestCase
|
|||
$this->assertFalse(Announce::validate($this->invalidAnnounce));
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function invalid_date()
|
||||
{
|
||||
$this->assertFalse(Announce::validate($this->invalidDate));
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function context_missing()
|
||||
{
|
||||
$this->assertFalse(Announce::validate($this->contextMissing));
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function audience_missing()
|
||||
{
|
||||
$this->assertFalse(Announce::validate($this->audienceMissing));
|
||||
$this->assertFalse(Announce::validate($this->audienceMissing2));
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function invalid_actor()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue