Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions packages/firebase_core/firebase_core/lib/src/firebase.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ class Firebase {
// for backwards compatibility and simply override the user-provided
// options.
resolvedOptions = FirebaseOptions(
apiKey: '12345',
apiKey: 'ADemoProjectApiKey000000000000000000000',
appId: '1:1:$platformString:1',
messagingSenderId: '',
messagingSenderId: '1',
projectId: demoProjectId,
);
// Now fall through to the normal initialization logic.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ void main() {
const String demoProjectId = 'demo-project-id';
const String expectedName = demoProjectId;
const FirebaseOptions expectedOptions = FirebaseOptions(
apiKey: '12345',
apiKey: 'ADemoProjectApiKey000000000000000000000',
// Flutter tests use android as the default platform.
appId: '1:1:android:1',
messagingSenderId: '',
messagingSenderId: '1',
projectId: demoProjectId,
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,14 @@ void main() {
await app.setAutomaticResourceManagementEnabled(false);
}
});

test('Firebase.initializeApp() with demoProjectId', () async {
const demoProjectId = 'demo-flutterfire-e2e';
final app = await Firebase.initializeApp(demoProjectId: demoProjectId);
addTearDown(app.delete);

expect(app.name, demoProjectId);
expect(app.options.projectId, demoProjectId);
});
});
}
Loading