-
Notifications
You must be signed in to change notification settings - Fork 3
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 #34 from TesteurManiak/fix/issue_33
Fix/issue 33
- Loading branch information
Showing
8 changed files
with
75 additions
and
6 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
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
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import 'package:icalendar_parser/icalendar_parser.dart'; | ||
import 'package:test/test.dart'; | ||
|
||
import 'test_utils.dart'; | ||
|
||
void main() { | ||
group('Issue #33', () { | ||
test('No email in ORGANIZER - 1', () { | ||
final eventText = readFileLines('organizer_no_email.ics'); | ||
final iCal = ICalendar.fromLines(eventText); | ||
expect(iCal.data.length, 1); | ||
|
||
final event = iCal.data[0]; | ||
final organizer = event['organizer'] as Map<String, dynamic>; | ||
expect(organizer['name'], 'Joe Jackson'); | ||
expect(organizer['mail'], ''); | ||
}); | ||
|
||
test('No email in ORGANIZER - 2', () { | ||
final eventText = readFileLines('organizer_no_email_2.ics'); | ||
final iCal = ICalendar.fromLines(eventText); | ||
expect(iCal.data.length, 1); | ||
|
||
final event = iCal.data[0]; | ||
final organizer = event['organizer'] as Map<String, dynamic>; | ||
expect(organizer['name'], 'Joe Jackson'); | ||
expect(organizer['mail'], ''); | ||
}); | ||
}); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
BEGIN:VCALENDAR | ||
VERSION:2.0 | ||
CALSCALE:GREGORIAN | ||
PRODID:adamgibbons/ics | ||
METHOD:PUBLISH | ||
BEGIN:VEVENT | ||
UID:b11ae923-9898-44ca-8f92-ed2ebe36863f | ||
SUMMARY:Cool event | ||
DTSTAMP:20211004T101600Z | ||
DTSTART:20211006T063000Z | ||
DTEND:20211006T073000Z | ||
DESCRIPTION:Some description | ||
STATUS:CANCELLED | ||
ORGANIZER;CN=Joe Jackson | ||
END:VEVENT | ||
END:VCALENDAR |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
BEGIN:VCALENDAR | ||
VERSION:2.0 | ||
CALSCALE:GREGORIAN | ||
PRODID:adamgibbons/ics | ||
METHOD:PUBLISH | ||
BEGIN:VEVENT | ||
UID:b11ae923-9898-44ca-8f92-ed2ebe36863f | ||
SUMMARY:Cool event | ||
DTSTAMP:20211004T101600Z | ||
DTSTART:20211006T063000Z | ||
DTEND:20211006T073000Z | ||
DESCRIPTION:Some description | ||
CATEGORIES:APPOINTMENT | ||
ORGANIZER;CN=Joe Jackson | ||
END:VEVENT | ||
END:VCALENDAR |