-
Notifications
You must be signed in to change notification settings - Fork 1
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 #5196 from nextcloud/backport/5170/stable3.5
[stable3.5] Fix issue with Attendee not being string crashing tooltip
- Loading branch information
Showing
2 changed files
with
18 additions
and
0 deletions.
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 |
---|---|---|
|
@@ -33,12 +33,22 @@ describe('utils/attendee test suite', () => { | |
expect(removeMailtoPrefix(`mailto:${uri}`)).toEqual(uri) | ||
}) | ||
|
||
it('should return blank strings when uris are not of type string', () => { | ||
expect(removeMailtoPrefix(null)).toEqual('') | ||
expect(removeMailtoPrefix(undefined)).toEqual('') | ||
}) | ||
|
||
it('should add mailto prefixes to uris', () => { | ||
const uri = '[email protected]' | ||
const uriWithPrefix = `mailto:${uri}` | ||
expect(addMailtoPrefix(uri)).toEqual(uriWithPrefix) | ||
expect(addMailtoPrefix(uriWithPrefix)).toEqual(uriWithPrefix) | ||
}) | ||
|
||
it('should add mailto prefixes to uris when they are not of type string', () => { | ||
expect(addMailtoPrefix(null)).toEqual("mailto:") | ||
expect(addMailtoPrefix(undefined)).toEqual("mailto:") | ||
}) | ||
|
||
it('should extract a display name of an organizer', () => { | ||
const commonName = 'My Name' | ||
|