Skip to content

Commit

Permalink
Fixed test in LoggerSettingsController_Tests.cls that failed in some …
Browse files Browse the repository at this point in the history
…orgs (#432)

Changed to use lastName (required field) instead of the optional field firstName
  • Loading branch information
mohan-chinnappan-n authored Dec 20, 2022
1 parent 4814f4e commit c7b5e97
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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<Id, User> expectedResultsById = new Map<Id, User>(
[SELECT Id, Name, Username, SmallPhotoUrl FROM User WHERE Name LIKE :searchTerm OR Username LIKE :searchTerm]
);
Expand Down

0 comments on commit c7b5e97

Please sign in to comment.