From a60b430b52a13102cd6c3a2991a669af03b531bf Mon Sep 17 00:00:00 2001 From: Reede Stockton Date: Tue, 16 Apr 2024 14:20:19 -0700 Subject: [PATCH] Check for isActive on test user for runAs --- force-app/main/default/classes/CON_ContactMerge_TEST.cls | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/force-app/main/default/classes/CON_ContactMerge_TEST.cls b/force-app/main/default/classes/CON_ContactMerge_TEST.cls index 18c81a6d9d3..22764e53f0f 100644 --- a/force-app/main/default/classes/CON_ContactMerge_TEST.cls +++ b/force-app/main/default/classes/CON_ContactMerge_TEST.cls @@ -967,7 +967,8 @@ public class CON_ContactMerge_TEST { } private static User getReadOnlyUser() { - return [SELECT Id FROM User WHERE Profile.Name = :UTIL_UnitTestData_TEST.PROFILE_READONLY_USER LIMIT 1]; + return [SELECT Id FROM User WHERE Profile.Name = :UTIL_UnitTestData_TEST.PROFILE_READONLY_USER + AND IsActive = TRUE LIMIT 1]; } private static void selectSearchResults(List searchResults) {