Add support for external_id on servers, closes #975

This commit is contained in:
Dane Everitt 2018-02-24 11:57:12 -06:00
parent f655188c58
commit 633bba6d6e
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
11 changed files with 73 additions and 15 deletions

View file

@ -58,6 +58,7 @@ class DetailsModificationServiceTest extends TestCase
$this->connection->shouldReceive('beginTransaction')->once()->withNoArgs()->andReturnNull();
$this->repository->shouldReceive('setFreshModel')->once()->with(false)->andReturnSelf();
$this->repository->shouldReceive('update')->once()->with($server->id, [
'external_id' => null,
'owner_id' => $data['owner_id'],
'name' => $data['name'],
'description' => $data['description'],
@ -95,11 +96,12 @@ class DetailsModificationServiceTest extends TestCase
'owner_id' => 1,
]);
$data = ['owner_id' => 2, 'name' => 'New Name', 'description' => 'New Description'];
$data = ['owner_id' => 2, 'name' => 'New Name', 'description' => 'New Description', 'external_id' => 'abcd1234'];
$this->connection->shouldReceive('beginTransaction')->once()->withNoArgs()->andReturnNull();
$this->repository->shouldReceive('setFreshModel')->once()->with(false)->andReturnSelf();
$this->repository->shouldReceive('update')->once()->with($server->id, [
'external_id' => 'abcd1234',
'owner_id' => $data['owner_id'],
'name' => $data['name'],
'description' => $data['description'],