Skip to content

Commit

Permalink
added 2nd test
Browse files Browse the repository at this point in the history
  • Loading branch information
TesteurManiak committed Oct 4, 2021
1 parent fa891d7 commit 9fc7cbf
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
13 changes: 12 additions & 1 deletion test/issue_33_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'test_utils.dart';

void main() {
group('Issue #33', () {
test('No email in ORGANIZER', () {
test('No email in ORGANIZER - 1', () {
final eventText = readFileLines('organizer_no_email.ics');
final iCal = ICalendar.fromLines(eventText);
expect(iCal.data.length, 1);
Expand All @@ -15,5 +15,16 @@ void main() {
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'], '');
});
});
}
16 changes: 16 additions & 0 deletions test/test_resources/organizer_no_email_2.ics
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

0 comments on commit 9fc7cbf

Please sign in to comment.