Skip to content
Snippets Groups Projects
Verified Commit b57acf83 authored by Damien's avatar Damien
Browse files

FEAT #7697 Unit tests

parent ef10d5c9
No related branches found
No related tags found
No related merge requests found
......@@ -167,6 +167,18 @@ class BasketControllerTest extends TestCase
$this->assertNotNull($responseBody->allGroups);
$this->assertInternalType('array', $responseBody->pages);
$this->assertNotNull($responseBody->pages);
$users = \Group\models\GroupModel::getUsersByGroupId(['select' => ['id'], 'groupId' => 'AGENT']);
$group = \Group\models\GroupModel::getByGroupId(['select' => ['id'], 'groupId' => 'AGENT']);
foreach ($users as $user) {
$preference = \User\models\UserBasketPreferenceModel::get([
'select' => ['display'],
'where' => ['user_serial_id = ?', 'group_serial_id = ?', 'basket_id = ?'],
'data' => [$user['id'], $group['id'], 'TEST-BASKET123']
]);
$this->assertNotNull($preference[0]);
$this->assertSame(true, $preference[0]['display']);
}
}
public function testUpdateGroup()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment