mirror of
https://github.com/flarum/core.git
synced 2025-08-01 14:10:37 +02:00
@@ -17,6 +17,7 @@ use Flarum\Api\Client;
|
||||
use Flarum\Api\Controller\CreateGroupController;
|
||||
use Flarum\Tests\integration\RetrievesAuthorizedUsers;
|
||||
use Flarum\Tests\integration\TestCase;
|
||||
use Flarum\User\Exception\PermissionDeniedException;
|
||||
use Flarum\User\Guest;
|
||||
use Flarum\User\User;
|
||||
use Illuminate\Support\Str;
|
||||
@@ -57,7 +58,6 @@ class AuthenticateWithApiKeyTest extends TestCase
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @expectedException \Flarum\User\Exception\PermissionDeniedException
|
||||
*/
|
||||
public function cannot_authorize_without_key()
|
||||
{
|
||||
@@ -65,6 +65,8 @@ class AuthenticateWithApiKeyTest extends TestCase
|
||||
$api = $this->app()->getContainer()->make(Client::class);
|
||||
$api->setErrorHandler(null);
|
||||
|
||||
$this->expectException(PermissionDeniedException::class);
|
||||
|
||||
$api->send(CreateGroupController::class, new Guest);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user