Skip to content

Commit

Permalink
minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
koji-1009 committed Jan 14, 2020
1 parent e27ca86 commit 9b2fc84
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.1"
version: "0.1.0"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
Expand Down
1 change: 0 additions & 1 deletion flutter_auth_ui.iml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_auth_ui/example/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_auth_ui/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_auth_ui/example/build" />
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_auth_ui/example/ios/Flutter/App.framework/flutter_assets/packages" />
<excludeFolder url="file://$MODULE_DIR$/example/ios/Flutter/App.framework/flutter_assets/packages" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
Expand Down
2 changes: 1 addition & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ packages:
source: hosted
version: "0.15.3"
firebase_auth_platform_interface:
dependency: transitive
dependency: "direct main"
description:
name: firebase_auth_platform_interface
url: "https://pub.dartlang.org"
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ dependencies:
sdk: flutter
firebase_auth: ^0.15.3
flutter_plugin_android_lifecycle: ^1.0.3
firebase_auth_platform_interface: ^1.1.2

dev_dependencies:
flutter_test:
Expand Down
22 changes: 18 additions & 4 deletions test/flutter_auth_ui_test.dart
Original file line number Diff line number Diff line change
@@ -1,23 +1,37 @@
import 'package:firebase_auth_platform_interface/firebase_auth_platform_interface.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_auth_ui/flutter_auth_ui.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
const MethodChannel channel = MethodChannel('flutter_auth_ui');

TestWidgetsFlutterBinding.ensureInitialized();

final mockUser = PlatformUser(
providerId: "test",
uid: "001",
displayName: "test",
photoUrl: null,
email: null,
phoneNumber: null,
creationTimestamp: 12345,
lastSignInTimestamp: 12345,
isAnonymous: false,
isEmailVerified: false,
providerData: Iterable.empty());

setUp(() {
channel.setMockMethodCallHandler((MethodCall methodCall) async {
return '42';
return mockUser;
});
});

tearDown(() {
channel.setMockMethodCallHandler(null);
});

test('getPlatformVersion', () async {
expect(await FlutterAuthUi.platformVersion, '42');
test('startUi', () async {
expect(await FlutterAuthUi.startUi(), mockUser);
});
}

0 comments on commit 9b2fc84

Please sign in to comment.