Skip to content

Commit

Permalink
Merge pull request #46 from fingerprintjs/fix/freeze-flutter-version
Browse files Browse the repository at this point in the history
Use latest flutter version for all workflows
  • Loading branch information
ilfa committed Jun 30, 2023
2 parents e27500b + 87f1675 commit 6dc5b84
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install and set Flutter version
uses: subosito/flutter-action@0c3f14223a08fa950c8a4c00bcfb834e65744135
with:
flutter-version: '3.3.8'
channel: 'stable'
- name: Restore packages
run: flutter pub get
- name: Create .env.local
Expand Down
14 changes: 10 additions & 4 deletions test/fpjs_pro_plugin_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,18 @@ void main() {

group('getVisitorId', () {
setUp(() {
channel.setMockMethodCallHandler((MethodCall methodCall) async {
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(channel, (MethodCall methodCall) async {
if (methodCall.method == 'getVisitorId') {
return testVisitorId;
}
return null;
});
});

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

test('should return visitor id when called without tags', () async {
Expand All @@ -67,15 +70,18 @@ void main() {

group('getVisitorData', () {
setUp(() {
channel.setMockMethodCallHandler((MethodCall methodCall) async {
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(channel, (MethodCall methodCall) async {
if (methodCall.method == 'getVisitorData') {
return [requestId, confidence, extendedResultAsJsonString];
}
return null;
});
});

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

test('should return visitor id when called without tags', () async {
Expand Down

0 comments on commit 6dc5b84

Please sign in to comment.