mirror of
https://github.com/flarum/core.git
synced 2025-08-06 16:36:47 +02:00
Merge branch 'main' into merge-1.6.3-into-main
This commit is contained in:
@@ -31,6 +31,22 @@ class ShowTest extends TestCase
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function guest_user_does_not_see_actor_relationship()
|
||||
{
|
||||
$response = $this->send(
|
||||
$this->request('GET', '/api')
|
||||
);
|
||||
|
||||
$this->assertEquals(200, $response->getStatusCode());
|
||||
|
||||
$json = json_decode($response->getBody()->getContents(), true);
|
||||
|
||||
$this->assertArrayNotHasKey('actor', Arr::get($json, 'data.relationships'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
@@ -51,6 +67,8 @@ class ShowTest extends TestCase
|
||||
$this->assertEquals('http://localhost/api', Arr::get($json, 'data.attributes.apiUrl'));
|
||||
|
||||
$this->assertArrayNotHasKey('adminUrl', Arr::get($json, 'data.attributes'));
|
||||
$this->assertArrayHasKey('actor', Arr::get($json, 'data.relationships'));
|
||||
$this->assertEquals(2, Arr::get($json, 'data.relationships.actor.data.id'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user