1
0
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:
Sami Mazouz
2023-01-13 19:12:11 +01:00
committed by GitHub
186 changed files with 3176 additions and 2622 deletions

View File

@@ -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'));
}
/**