adjust tests for new reseller permission (edit ipsandports not necessary)
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -217,7 +217,7 @@ class IpsAndPortsTest extends TestCase
|
|||||||
'listen_statement' => 0
|
'listen_statement' => 0
|
||||||
];
|
];
|
||||||
$this->expectExceptionCode(405);
|
$this->expectExceptionCode(405);
|
||||||
$this->expectExceptionMessage("You cannot access this resource");
|
$this->expectExceptionMessage("Not allowed to execute given command.");
|
||||||
IpsAndPorts::getLocal($reseller_userdata, $data)->update();
|
IpsAndPorts::getLocal($reseller_userdata, $data)->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -249,22 +249,6 @@ class IpsAndPortsTest extends TestCase
|
|||||||
IpsAndPorts::getLocal($admin_userdata, $data)->update();
|
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()
|
public function testAdminIpsAndPortsDeleteCantDeleteDefaultIp()
|
||||||
{
|
{
|
||||||
global $admin_userdata;
|
global $admin_userdata;
|
||||||
|
|||||||
Reference in New Issue
Block a user