PMCORE-2524: Conflicts with develop
This commit is contained in:
@@ -415,8 +415,7 @@ class DelegationTest extends TestCase
|
||||
->states('foreign_keys')
|
||||
->create();
|
||||
$title = $delegations->last()
|
||||
->application
|
||||
->APP_TITLE;
|
||||
->DEL_TITLE;
|
||||
// We need to commit the records inserted because is needed for the "fulltext" index
|
||||
DB::commit();
|
||||
|
||||
@@ -2510,4 +2509,33 @@ class DelegationTest extends TestCase
|
||||
$result = Delegation::participation($application->APP_UID, $user->USR_UID);
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This check the return of thread title
|
||||
*
|
||||
* @covers \ProcessMaker\Model\Delegation::getThreadTitle()
|
||||
* @test
|
||||
*/
|
||||
public function it_get_thread_title()
|
||||
{
|
||||
$delegation = factory(Delegation::class)->states('foreign_keys')->create();
|
||||
$result = Delegation::getThreadTitle($delegation->TAS_UID, $delegation->APP_NUMBER, $delegation->DEL_INDEX, []);
|
||||
$this->assertNotEmpty($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This tests the getDeltitle() method
|
||||
*
|
||||
* @covers \ProcessMaker\Model\Delegation::getDeltitle()
|
||||
* @test
|
||||
*/
|
||||
public function it_should_test_the_get_del_title_method()
|
||||
{
|
||||
$delegation = factory(Delegation::class)->create([
|
||||
'DEL_TITLE' => "test"
|
||||
]);
|
||||
$result = Delegation::getDeltitle($delegation->APP_NUMBER, $delegation->DEL_INDEX);
|
||||
$this->assertNotEmpty($result);
|
||||
$this->assertEquals($result, $delegation->DEL_TITLE);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user