Return tests to passing state

This commit is contained in:
Dane Everitt 2021-09-11 12:02:15 -07:00
parent e96ead4c4d
commit fde0660e6c
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
3 changed files with 17 additions and 45 deletions

View file

@ -29,20 +29,15 @@ class SuspensionServiceTest extends IntegrationTestCase
{
$server = $this->createServerModel();
$this->repository->expects('setServer')->twice()->andReturnSelf();
$this->repository->expects('suspend')->with(false)->andReturnUndefined();
$this->repository->expects('setServer->sync')->twice()->andReturnSelf();
$this->getService()->toggle($server, SuspensionService::ACTION_SUSPEND);
$server->refresh();
$this->assertTrue($server->isSuspended());
$this->repository->expects('suspend')->with(true)->andReturnUndefined();
$this->assertTrue($server->refresh()->isSuspended());
$this->getService()->toggle($server, SuspensionService::ACTION_UNSUSPEND);
$server->refresh();
$this->assertFalse($server->isSuspended());
$this->assertFalse($server->refresh()->isSuspended());
}
public function testNoActionIsTakenIfSuspensionStatusIsUnchanged()