From 20b017b248a0f766aced3c4e52a2e4fcc9747455 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 23 Aug 2021 07:40:09 -0400 Subject: [PATCH] Test cleanup --- tests/phpunit/api/v4/Action/RecentItemsTest.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/api/v4/Action/RecentItemsTest.php b/tests/phpunit/api/v4/Action/RecentItemsTest.php index 967e37a10e..1ea4a0b229 100644 --- a/tests/phpunit/api/v4/Action/RecentItemsTest.php +++ b/tests/phpunit/api/v4/Action/RecentItemsTest.php @@ -27,10 +27,7 @@ use Civi\Api4\Activity; */ class RecentItemsTest extends UnitTestCase { - /** - * This locks in a fix to ensure that if a user doesn't have permission to view the is_deleted field that doesn't hard fail if that field happens to be in an APIv4 call. - */ - public function testIsDeletedPermission(): void { + public function testAddDeleteActivity(): void { $cid = $this->createLoggedInUser(); $aid = Activity::create(FALSE) @@ -41,6 +38,8 @@ class RecentItemsTest extends UnitTestCase { $this->assertEquals(1, $this->getRecentItemCount(['type' => 'Activity', 'id' => $aid])); + $this->assertStringContainsString('Hello recent!', \CRM_Utils_Recent::get()[0]['title']); + Activity::delete(FALSE)->addWhere('id', '=', $aid)->execute(); $this->assertEquals(0, $this->getRecentItemCount(['type' => 'Activity', 'id' => $aid])); -- 2.25.1