Skip to content

Commit

Permalink
1.1.1
Browse files Browse the repository at this point in the history
* refactor deprecated methods in tests

* update CHANGELOG

* bump version to 1.1.1
  • Loading branch information
Nikoro authored Feb 13, 2024
1 parent 78db482 commit 4f6ccb2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.1.1

Refactor deprecated methods in tests

## 1.1.0

- Added `full date pattern` (only available for iOS, macOS and web)
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.1.0"
version: "1.1.1"
term_glyph:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion example_with_tests/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.1.0"
version: "1.1.1"
term_glyph:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: system_date_time_format
description: A plugin for getting date and time format patterns from device system settings.
version: 1.1.0
version: 1.1.1
repository: https://github.com/Nikoro/system_date_time_format
issue_tracker: https://github.com/Nikoro/system_date_time_format/issues

Expand Down
12 changes: 8 additions & 4 deletions test/system_date_time_format_method_channel_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ import 'package:system_date_time_format/src/system_date_time_format_method_chann
import '_tools/tools.dart';

void main() {
TestWidgetsFlutterBinding.ensureInitialized();

final platform = MethodChannelSystemDateTimeFormat();
const channel = MethodChannel('system_date_time_format');

TestWidgetsFlutterBinding.ensureInitialized();

tearDown(() => channel.setMockMethodCallHandler(null));
tearDown(() {
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(channel, null);
});

group('MethodChannelSystemDateTimeFormat', () {
[
Expand All @@ -25,7 +28,8 @@ void main() {

test('${function.name}() returns correct format: [$expectedValue]',
() async {
channel.setMockMethodCallHandler((_) async => expectedValue);
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(channel, (_) async => expectedValue);

final result = await function();
expect(result, expectedValue);
Expand Down

0 comments on commit 4f6ccb2

Please sign in to comment.