Fix all currently failing tests

This commit is contained in:
Dane Everitt 2017-09-24 22:28:16 -05:00
parent 3a8bea9588
commit dd456a4c9c
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
11 changed files with 175 additions and 315 deletions

View file

@ -32,7 +32,7 @@ use Pterodactyl\Contracts\Repository\PermissionRepositoryInterface;
class PermissionCreationServiceTest extends TestCase
{
/**
* @var \Pterodactyl\Contracts\Repository\PermissionRepositoryInterface
* @var \Pterodactyl\Contracts\Repository\PermissionRepositoryInterface|\Mockery\Mock
*/
protected $repository;
@ -59,14 +59,13 @@ class PermissionCreationServiceTest extends TestCase
{
$permissions = ['reset-sftp', 'view-sftp'];
$this->repository->shouldReceive('insert')->with([
['subuser_id' => 1, 'permission' => 'reset-sftp'],
['subuser_id' => 1, 'permission' => 'view-sftp'],
]);
$this->repository->shouldReceive('withoutFresh')->withNoArgs()->once()->andReturnSelf()
->shouldReceive('insert')->with([
['subuser_id' => 1, 'permission' => 'reset-sftp'],
['subuser_id' => 1, 'permission' => 'view-sftp'],
])->once()->andReturnNull();
$response = $this->service->handle(1, $permissions);
$this->assertNotEmpty($response);
$this->assertEquals(['s:get', 's:console', 's:set-password'], $response);
$this->service->handle(1, $permissions);
$this->assertTrue(true);
}
}