From a022a4e8e8a6f613f3a909334a4371a340c4fb0e Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Wed, 11 May 2022 14:19:27 +0300 Subject: [PATCH] fix test --- tests/integration/Espo/Actions/MassActionTest.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/integration/Espo/Actions/MassActionTest.php b/tests/integration/Espo/Actions/MassActionTest.php index 23b4972b39..706069a0c9 100644 --- a/tests/integration/Espo/Actions/MassActionTest.php +++ b/tests/integration/Espo/Actions/MassActionTest.php @@ -47,6 +47,7 @@ use Espo\Core\{ ORM\EntityManager, Application, Exceptions\Forbidden, + Exceptions\Error, }; class MassActionTest extends \tests\integration\Core\BaseTestCase @@ -293,12 +294,15 @@ class MassActionTest extends \tests\integration\Core\BaseTestCase $process = $injectableFactory1->create(JobProcess::class); + // Mass-update for User entity type is allowed only for admins. + $this->expectException(Error::class); + $process->run(JobData::create()->withTargetId($massActionId)); - $em->refreshEntity($user); + /*$em->refreshEntity($user); $em->refreshEntity($user1); $this->assertEquals('Tester', $user->get('title')); - $this->assertEquals(null, $user1->get('title')); + $this->assertEquals(null, $user1->get('title'));*/ } }