Skip to content

Commit

Permalink
TF-2638 Update VacationResponse to include null fields (toDate, fromD…
Browse files Browse the repository at this point in the history
…ate, subject, htmlBody)
  • Loading branch information
hoangdat committed Feb 27, 2024
1 parent a1b7969 commit 351a1bf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
4 changes: 0 additions & 4 deletions lib/jmap/mail/vacation/vacation_response.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,15 @@ class VacationResponse with EquatableMixin {
@JsonKey(includeIfNull: false)
final bool? isEnabled;

@JsonKey(includeIfNull: false)
final UTCDate? fromDate;

@JsonKey(includeIfNull: false)
final UTCDate? toDate;

@JsonKey(includeIfNull: false)
final String? subject;

@JsonKey(includeIfNull: false)
final String? textBody;

@JsonKey(includeIfNull: false)
final String? htmlBody;

VacationResponse({
Expand Down
10 changes: 4 additions & 6 deletions lib/jmap/mail/vacation/vacation_response.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions test/jmap/vacation/set_vacation_method_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ void main() {
"singleton": {
"isEnabled": true,
"fromDate": "2022-08-16T15:00:00.000Z",
"textBody": "Hello dab"
"toDate": null,
"subject": null,
"textBody": "Hello dab",
"htmlBody": null
}
}
},
Expand All @@ -92,7 +95,7 @@ void main() {
},
headers: {
"accept": "application/json;jmapVersion=rfc-8621",
"content-length": 677
"content-length": 875
}
);

Expand Down

0 comments on commit 351a1bf

Please sign in to comment.