From c7b5e97f34fbbaf439da9d7453c3c75a015e5d70 Mon Sep 17 00:00:00 2001 From: mohan-chinnappan-n Date: Tue, 20 Dec 2022 10:17:12 -0500 Subject: [PATCH] Fixed test in LoggerSettingsController_Tests.cls that failed in some orgs (#432) Changed to use lastName (required field) instead of the optional field firstName --- .../log-management/classes/LoggerSettingsController_Tests.cls | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nebula-logger/core/tests/log-management/classes/LoggerSettingsController_Tests.cls b/nebula-logger/core/tests/log-management/classes/LoggerSettingsController_Tests.cls index 53dc1423b..15f4b948d 100644 --- a/nebula-logger/core/tests/log-management/classes/LoggerSettingsController_Tests.cls +++ b/nebula-logger/core/tests/log-management/classes/LoggerSettingsController_Tests.cls @@ -330,7 +330,8 @@ private class LoggerSettingsController_Tests { @IsTest static void it_should_return_user_search_results_list_when_matches_found() { - String searchTerm = '%' + System.UserInfo.getFirstName() + '%'; + // Using lastName (required field) instead of the optional field firstName + String searchTerm = '%' + System.UserInfo.getLastName() + '%'; Map expectedResultsById = new Map( [SELECT Id, Name, Username, SmallPhotoUrl FROM User WHERE Name LIKE :searchTerm OR Username LIKE :searchTerm] );