Finalize tests
This commit is contained in:
parent
609bf32843
commit
fbd5c25ed0
6 changed files with 11 additions and 5 deletions
|
@ -60,14 +60,16 @@ class OptionCreationServiceTest extends TestCase
|
|||
*/
|
||||
public function testCreateNewModelWithoutUsingConfigFrom()
|
||||
{
|
||||
$model = factory(ServiceOption::class)->make();
|
||||
$model = factory(ServiceOption::class)->make([
|
||||
'tag' => str_random(10),
|
||||
]);
|
||||
|
||||
$this->config->shouldReceive('get')->with('pterodactyl.service.author')->once()->andReturn('test@example.com');
|
||||
$this->uuid->shouldReceive('uuid4->toString')->withNoArgs()->once()->andReturn('uuid-string');
|
||||
$this->repository->shouldReceive('create')->with([
|
||||
'name' => $model->name,
|
||||
'config_from' => null,
|
||||
'tag' => 'test@example.com:' . $model->tag,
|
||||
'config_from' => null,
|
||||
'uuid' => 'uuid-string',
|
||||
], true, true)->once()->andReturn($model);
|
||||
|
||||
|
|
|
@ -51,6 +51,9 @@ class ServiceOptionExporterServiceTest extends TestCase
|
|||
$this->service = new ServiceOptionExporterService($this->carbon, $this->repository);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that a JSON structure is returned.
|
||||
*/
|
||||
public function testJsonStructureIsExported()
|
||||
{
|
||||
$option = factory(ServiceOption::class)->make();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue