Add a test for returned as data
This commit is contained in:
parent
60248e2b05
commit
43a808db5b
1 changed files with 26 additions and 0 deletions
26
tests/Feature/ActivityStreamTest.php
Normal file
26
tests/Feature/ActivityStreamTest.php
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Feature;
|
||||||
|
|
||||||
|
use Tests\TestCase;
|
||||||
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
|
|
||||||
|
class ActivityStreamTest extends TestCase
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Test request to homepage returns data for site owner.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function test_homepage_returns_data_for_site_owner()
|
||||||
|
{
|
||||||
|
$response = $this->get('/', ['Accept' => 'application/activity+json']);
|
||||||
|
$response->assertHeader('Content-Type', 'application/activity+json');
|
||||||
|
$response->assertJson([
|
||||||
|
'@context' => 'https://www.w3.org/ns/activitystreams',
|
||||||
|
'id' => config('app.url'),
|
||||||
|
'type' => 'Person',
|
||||||
|
'name' => config('app.display_name'),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue