Merge branch 'develop' into v2
This commit is contained in:
commit
74a77a0e86
|
@ -27,6 +27,18 @@ class WebsocketControllerTest extends ClientApiIntegrationTestCase
|
||||||
->assertJsonPath('errors.0.detail', 'You do not have permission to connect to this server\'s websocket.');
|
->assertJsonPath('errors.0.detail', 'You do not have permission to connect to this server\'s websocket.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Confirm users cannot access the websocket for another user's server.
|
||||||
|
*/
|
||||||
|
public function testUserWithoutPermissionForServerReceivesError()
|
||||||
|
{
|
||||||
|
[, $server] = $this->generateTestAccount([Permission::ACTION_WEBSOCKET_CONNECT]);
|
||||||
|
[$user,] = $this->generateTestAccount([Permission::ACTION_WEBSOCKET_CONNECT]);
|
||||||
|
|
||||||
|
$this->actingAs($user)->getJson("/api/client/servers/{$server->uuid}/websocket")
|
||||||
|
->assertStatus(Response::HTTP_NOT_FOUND);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test that the expected permissions are returned for the server owner and that the JWT is
|
* Test that the expected permissions are returned for the server owner and that the JWT is
|
||||||
* configured correctly.
|
* configured correctly.
|
||||||
|
|
Loading…
Reference in New Issue