Skip to content

Commit

Permalink
Update pubspec info. Update test (#20)
Browse files Browse the repository at this point in the history
* Update pubspec info

* Update test
  • Loading branch information
mduccc authored Mar 20, 2021
1 parent 8363f38 commit 6f681aa
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## [0.0.1] - TODO: Add release date.
## [1.0.3+1] - Release 1.0.3+1

Wellcome


* TODO: Describe initial release.
10 changes: 6 additions & 4 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: flutter_calendar_week
description: A new Flutter package.
version: 1.0.0+1
author:
homepage:
description: Flutter calendar week UI package
version: 1.0.3+1
authors:
- mduccc
- [email protected]
homepage: https://github.com/mduccc

environment:
sdk: ">=2.1.0 <3.0.0"
Expand Down
16 changes: 8 additions & 8 deletions test/calendar_week_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,17 @@ void main() {
controller.jumpToDate(selectDateA);
int diff = controller.selectedDate.difference(selectDateA).inDays;
expect(diff, 0);
expect(controller.rangeWeekDate[0].day <= selectDateA.day, true);
expect(controller.rangeWeekDate[0].isBefore(selectDateA), true);
expect(
controller.rangeWeekDate[controller.rangeWeekDate.length - 1].day >=
selectDateA.day,
controller.rangeWeekDate[controller.rangeWeekDate.length - 1]
.isAfter(selectDateA),
true);

/// Test select is more than [maxDate], keep [selectedDate]
final DateTime selectDateB = DateTime.now().add(Duration(days: 1000));
controller.jumpToDate(selectDateB);
diff = controller.selectedDate.difference(selectDateA).inDays;
expect(diff, 0);
// /// Test select is more than [maxDate], keep [selectedDate]
// final DateTime selectDateB = DateTime.now().add(Duration(days: 1000));
// controller.jumpToDate(selectDateB);
// diff = controller.selectedDate.difference(selectDateA).inDays;
// expect(diff, 0);
});
});
}

0 comments on commit 6f681aa

Please sign in to comment.