From b7264cdc5d7e7acc34037498989344b96007d489 Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Sat, 31 Dec 2022 00:47:37 +0100 Subject: [PATCH] adjust tests for new reseller permission (edit ipsandports not necessary) Signed-off-by: Michael Kaufmann --- tests/IpsAndPorts/IpsAndPortsTest.php | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/tests/IpsAndPorts/IpsAndPortsTest.php b/tests/IpsAndPorts/IpsAndPortsTest.php index 6b67922e..e3ce3c4a 100644 --- a/tests/IpsAndPorts/IpsAndPortsTest.php +++ b/tests/IpsAndPorts/IpsAndPortsTest.php @@ -217,7 +217,7 @@ class IpsAndPortsTest extends TestCase 'listen_statement' => 0 ]; $this->expectExceptionCode(405); - $this->expectExceptionMessage("You cannot access this resource"); + $this->expectExceptionMessage("Not allowed to execute given command."); IpsAndPorts::getLocal($reseller_userdata, $data)->update(); } @@ -249,22 +249,6 @@ class IpsAndPortsTest extends TestCase IpsAndPorts::getLocal($admin_userdata, $data)->update(); } - public function testResellerIpsAndPortsEditNoDuplicate() - { - global $admin_userdata; - $json_result = Admins::getLocal($admin_userdata, array( - 'loginname' => 'reseller' - ))->get(); - $reseller_userdata = json_decode($json_result, true)['data']; - $reseller_userdata['adminsession'] = 1; - $data = [ - 'id' => 3, - 'ip' => '82.149.225.46' - ]; - $this->expectExceptionMessage("This IP/Port combination already exists."); - IpsAndPorts::getLocal($reseller_userdata, $data)->update(); - } - public function testAdminIpsAndPortsDeleteCantDeleteDefaultIp() { global $admin_userdata;