mirror of
https://github.com/flarum/framework.git
synced 2024-11-29 04:33:47 +08:00
32 lines
706 B
PHP
32 lines
706 B
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of Flarum.
|
|
*
|
|
* For detailed copyright and license information, please view the
|
|
* LICENSE file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Flarum\Tests\integration\api\groups;
|
|
|
|
use Flarum\Group\Group;
|
|
use Flarum\Tests\integration\TestCase;
|
|
|
|
class ListTest extends TestCase
|
|
{
|
|
/**
|
|
* @test
|
|
*/
|
|
public function shows_index_for_guest()
|
|
{
|
|
$response = $this->send(
|
|
$this->request('GET', '/api/groups')
|
|
);
|
|
|
|
$this->assertEquals(200, $response->getStatusCode());
|
|
$data = json_decode($response->getBody()->getContents(), true);
|
|
|
|
$this->assertEquals(Group::count(), count($data['data']));
|
|
}
|
|
}
|