Skip to content

Commit

Permalink
added serilization test for eventColor
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Wolf committed Sep 11, 2024
1 parent c702f17 commit 2ee14a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/src/models/event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ class Event {
title = json['eventTitle'];
description = json['eventDescription'];
color = json['eventColor'];
colorKey = json['eventColorKey'];

startTimestamp = json['eventStartDate'];
startLocationName = json['eventStartTimeZone'];
Expand Down
6 changes: 5 additions & 1 deletion test/device_calendar_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,9 @@ void main() {
recurrenceRule: recurrence,
reminders: [reminder],
availability: Availability.Busy,
status: EventStatus.Confirmed);
status: EventStatus.Confirmed,
);
event.updateEventColor(EventColor(0xffff00ff, 1));

final stringEvent = event.toJson();
expect(stringEvent, isNotNull);
Expand All @@ -241,5 +243,7 @@ void main() {
expect(newEvent.reminders?.length, equals(1));
expect(newEvent.availability, equals(event.availability));
expect(newEvent.status, equals(event.status));
expect(newEvent.color, equals(event.color));
expect(newEvent.colorKey, equals(event.colorKey));
});
}

0 comments on commit 2ee14a1

Please sign in to comment.