PMCORE-2583
This commit is contained in:
@@ -18,6 +18,15 @@ class ApplicationTest extends TestCase
|
||||
{
|
||||
use DatabaseTransactions;
|
||||
|
||||
/**
|
||||
* Set up function.
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
Application::query()->delete();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test belongs to APP_CUR_USER
|
||||
*
|
||||
|
||||
@@ -109,7 +109,7 @@ class DelegationTest extends TestCase
|
||||
public function it_return_scope_delegate_date_from()
|
||||
{
|
||||
$table = factory(Delegation::class)->states('foreign_keys')->create();
|
||||
$this->assertCount(1, $table->delegateDateFrom($table->DEL_DELEGATE_DATE->format("Y-m-d"))->get());
|
||||
$this->assertCount(1, $table->delegateDateFrom($table->DEL_DELEGATE_DATE->format("Y-m-d H:i:s"))->get());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -121,7 +121,7 @@ class DelegationTest extends TestCase
|
||||
public function it_return_scope_delegate_date_to()
|
||||
{
|
||||
$table = factory(Delegation::class)->states('foreign_keys')->create();
|
||||
$this->assertCount(1, $table->delegateDateTo($table->DEL_DELEGATE_DATE->format("Y-m-d"))->get());
|
||||
$this->assertCount(1, $table->delegateDateTo($table->DEL_DELEGATE_DATE->format("Y-m-d H:i:s"))->get());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -498,7 +498,7 @@ class DelegationTest extends TestCase
|
||||
// Get first page, the minor case title
|
||||
$results = Delegation::search(null, 0, 2, null, null, null, 'ASC', 'APP_TITLE');
|
||||
$this->assertCount(2, $results['data']);
|
||||
$this->assertGreaterThan($results['data'][0]['APP_TITLE'], $results['data'][1]['APP_TITLE']);
|
||||
$this->assertGreaterThanOrEqual($results['data'][0]['APP_TITLE'], $results['data'][1]['APP_TITLE']);
|
||||
// Get first page, the major case title
|
||||
$results = Delegation::search(null, 0, 2, null, null, null, 'DESC', 'APP_TITLE');
|
||||
$this->assertCount(2, $results['data']);
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
namespace Tests\unit\workflow\src\ProcessMaker\Model;
|
||||
|
||||
use ProcessMaker\Model\ListUnassigned;
|
||||
use ProcessMaker\Model\Process;
|
||||
use ProcessMaker\Model\ProcessCategory;
|
||||
use ProcessMaker\Model\Task;
|
||||
use ProcessMaker\Model\TaskUser;
|
||||
use ProcessMaker\Model\User;
|
||||
use Tests\TestCase;
|
||||
|
||||
/**
|
||||
* Class ListUnassignedTest
|
||||
*
|
||||
* @coversDefaultClass \ProcessMaker\Model\ListUnassigned
|
||||
*/
|
||||
class ListUnassignedTest extends TestCase
|
||||
{
|
||||
// The ListUnassigned class was deprecated in Release 3.6.0
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user