Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
6083ec0
Add support for Contexts interface
Jun 15, 2019
219ff4c
Remove print statement
Jun 16, 2019
66e0ca8
Apply dartfmt
Jun 16, 2019
3fa1985
Fix batteryLevel assert
Jun 16, 2019
ff823bb
Make batteryLevel assert clearer
Jun 16, 2019
8eab7fe
Remove unused var
Jun 16, 2019
f08ef81
Add null check for runtimes
Jun 16, 2019
754c294
Fix Browser not being serialized properly
Jun 16, 2019
d165cdd
Add trailing commas
Sep 12, 2019
1a72e89
Specify types explicitly
Sep 12, 2019
5206b76
Rename Os to OperatingSystem
Sep 12, 2019
eaac6f5
Add link to Sentry documentation
Sep 12, 2019
ef8173b
Add blank line after first paragraph
Sep 12, 2019
1fa38fa
Fix App documentation
Sep 12, 2019
a0df7b6
Add blank line between first and second paragraphs
Sep 12, 2019
bbdee84
Merge branch 'master' into contexts
maks Jan 10, 2020
8643fc7
move contexts implementation to new base class
maks Jan 10, 2020
08e51f3
contexts test, fix bug, missing field in device
maks Jan 10, 2020
f631cc2
Merge pull request #1 from maks/contexts
wilkomanger Jan 10, 2020
a124b0b
boottime test independent of test machine timezone
maks Jan 13, 2020
0084603
Merge pull request #2 from maks/context-fix-test
wilkomanger Jan 13, 2020
1bf165b
improve contexts test based on PR feedback
maks Jan 21, 2020
795975a
bump version to 3.0.1, update Changelog
maks Jan 21, 2020
56659ee
Merge pull request #3 from maks/context-fix-test
wilkomanger Jan 23, 2020
782143b
match reported SDK version to version in pubspec
maks Jan 23, 2020
d7d63d7
Merge pull request #4 from maks/context-fix-test
wilkomanger Jan 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
boottime test independent of test machine timezone
  • Loading branch information
maks committed Jan 13, 2020
commit a124b0b3c060849079c4f5c3516f9a4995af815b
5 changes: 3 additions & 2 deletions test/contexts_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'package:test/test.dart';

void main() {
group(Contexts, () {
final testBootTime = DateTime.fromMicrosecondsSinceEpoch(0);
test('serializes to JSON', () {
final testDevice = Device(
name: 'testDevice',
Expand All @@ -32,7 +33,7 @@ void main() {
freeStorage: 1234567,
externalStorageSize: 98765,
externalFreeStorage: 98765,
bootTime: DateTime.fromMicrosecondsSinceEpoch(0),
bootTime: testBootTime,
timezone: 'Australia/Melbourne',
);
final testOS = OperatingSystem(name: 'testOS');
Expand Down Expand Up @@ -78,7 +79,7 @@ void main() {
'free_storage': 1234567,
'external_storage_size': 98765,
'external_free_storage': 98765,
'boot_time': '1970-01-01T10:00:00.000',
'boot_time': testBootTime.toIso8601String(),
'timezone': 'Australia/Melbourne',
},
'os': {
Expand Down