-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44253 from callstack-internal/fix/prevent-display…
…ing-email-twice-on-expense fix: prevent displaying email twice in search when it exists
- Loading branch information
Showing
2 changed files
with
10 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2938,6 +2938,15 @@ describe('OptionsListUtils', () => { | |
|
||
expect(filteredOptions.recentReports.length).toBe(2); | ||
}); | ||
|
||
it('should not return any user to invite if email exists on the personal details list', () => { | ||
const searchText = '[email protected]'; | ||
const options = OptionsListUtils.getSearchOptions(OPTIONS, '', [CONST.BETAS.ALL]); | ||
|
||
const filteredOptions = OptionsListUtils.filterOptions(options, searchText); | ||
expect(filteredOptions.personalDetails.length).toBe(1); | ||
expect(filteredOptions.userToInvite).toBe(null); | ||
}); | ||
}); | ||
|
||
describe('canCreateOptimisticPersonalDetailOption', () => { | ||
|