diff --git a/lib/Froxlor/Api/Commands/DomainZones.php b/lib/Froxlor/Api/Commands/DomainZones.php index c5b29296..32748c20 100644 --- a/lib/Froxlor/Api/Commands/DomainZones.php +++ b/lib/Froxlor/Api/Commands/DomainZones.php @@ -545,6 +545,6 @@ class DomainZones extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour \Froxlor\System\Cronjob::inserttask(\Froxlor\Cron\TaskId::REBUILD_DNS); return $this->response(true); } - return $this->response(null, 204); + return $this->response(true, 304); } } diff --git a/tests/DomainZones/DomainZonesTest.php b/tests/DomainZones/DomainZonesTest.php index 47f1d806..b4abc13b 100644 --- a/tests/DomainZones/DomainZonesTest.php +++ b/tests/DomainZones/DomainZonesTest.php @@ -929,7 +929,7 @@ class DomainZonesTest extends TestCase $json_result = DomainZones::getLocal($customer_userdata, $data)->delete(); $result = json_decode($json_result, true); $this->assertTrue($result['data']); - $this->assertEquals(200, $result['status']); + $this->assertEquals(200, http_response_code()); } public function testCustomerDomainZonesDeleteUnmodified() @@ -949,6 +949,6 @@ class DomainZonesTest extends TestCase $json_result = DomainZones::getLocal($customer_userdata, $data)->delete(); $result = json_decode($json_result, true); $this->assertTrue($result['data']); - $this->assertEquals(304, $result['status']); + $this->assertEquals(304, http_response_code()); } } diff --git a/tests/Global/FroxlorRpcTest.php b/tests/Global/FroxlorRpcTest.php index 866f8a36..84c3bb00 100644 --- a/tests/Global/FroxlorRpcTest.php +++ b/tests/Global/FroxlorRpcTest.php @@ -60,7 +60,7 @@ class FroxlorRpcTest extends TestCase public function testNoCommandGiven() { $this->expectExceptionCode(400); - $this->expectExceptionMessage("No command given"); + $this->expectExceptionMessage("Please provide a command."); $_SERVER['PHP_AUTH_USER'] = 'test'; $_SERVER['PHP_AUTH_PW'] = 'test'; FroxlorRPC::validateRequest(json_encode(['cmd' => 'test'])); @@ -69,7 +69,7 @@ class FroxlorRpcTest extends TestCase public function testInvalidCommandGiven() { $this->expectExceptionCode(400); - $this->expectExceptionMessage("Invalid command"); + $this->expectExceptionMessage("The given command is invalid."); $_SERVER['PHP_AUTH_USER'] = 'test'; $_SERVER['PHP_AUTH_PW'] = 'test'; FroxlorRPC::validateRequest(json_encode(['command' => 'Froxlor']));