PMCORE-2583

This commit is contained in:
Paula Quispe
2020-12-18 10:10:49 -04:00
parent a460fa65e2
commit ce99be2d56
13 changed files with 321 additions and 856 deletions

View File

@@ -10,6 +10,15 @@ class UserTest extends TestCase
{
use DatabaseTransactions;
/**
* Set up function.
*/
public function setUp()
{
parent::setUp();
User::query()->delete();
}
/**
* Tests the users filters scope with the usr uid filter
*
@@ -110,9 +119,13 @@ class UserTest extends TestCase
]);
// Assertions
$this->assertCount(4, User::getUsersForHome());
// Only will considerate the actives
$this->assertCount(3, User::getUsersForHome());
// Only will considerate the name Smith
$this->assertCount(3, User::getUsersForHome('Smith'));
$this->assertCount(4, User::getUsersForHome(null, null, 2));
// Only will considerate by default the actives
$this->assertCount(3, User::getUsersForHome(null, null, 2));
// Only will considerate by default the actives and limit
$this->assertCount(1, User::getUsersForHome(null, 2, 1));
}
}