Unverified Commit 79e24094 authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

Fake out DeviceManager.getDevices in test (#58541)

parent 37bc9008
......@@ -19,10 +19,12 @@ import '../src/mocks.dart';
void main() {
group('DeviceManager', () {
testUsingContext('getDevices', () async {
// Test that DeviceManager.getDevices() doesn't throw.
final DeviceManager deviceManager = DeviceManager();
final List<Device> devices = await deviceManager.getDevices();
expect(devices, isList);
final FakeDevice device1 = FakeDevice('Nexus 5', '0553790d0a4e726f');
final FakeDevice device2 = FakeDevice('Nexus 5X', '01abfc49119c410e');
final FakeDevice device3 = FakeDevice('iPod touch', '82564b38861a9a5');
final List<Device> devices = <Device>[device1, device2, device3];
final DeviceManager deviceManager = TestDeviceManager(devices);
expect(await deviceManager.getDevices(), devices);
});
testUsingContext('getDeviceById', () async {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment