Test installation status when ideviceid is not installed (#10254)

Ensure that flutter doctor returns a partial installation status when
ideviceid is not installed.
This commit is contained in:
Chris Bracken
2017-05-22 14:09:37 -07:00
committed by GitHub
parent b291bf5d6a
commit 0e5d4a8771
2 changed files with 40 additions and 15 deletions

View File

@@ -100,6 +100,18 @@ void main() {
expect(result.type, ValidationType.partial);
}, overrides: <Type, Generator>{ Xcode: () => xcode });
testUsingContext('Emits partial status when libimobiledevice is not installed', () async {
when(xcode.isInstalled).thenReturn(true);
when(xcode.xcodeVersionText)
.thenReturn('Xcode 8.2.1\nBuild version 8C1002\n');
when(xcode.isInstalledAndMeetsVersionCheck).thenReturn(true);
when(xcode.eulaSigned).thenReturn(true);
final IOSWorkflowTestTarget workflow = new IOSWorkflowTestTarget()
..hasWorkingLibimobiledevice = false;
final ValidationResult result = await workflow.validate();
expect(result.type, ValidationType.partial);
}, overrides: <Type, Generator>{ Xcode: () => xcode });
testUsingContext('Emits partial status when ios-deploy is not installed', () async {
when(xcode.isInstalled).thenReturn(true);
when(xcode.xcodeVersionText)
@@ -209,6 +221,9 @@ class IOSWorkflowTestTarget extends IOSWorkflow {
@override
bool hasHomebrew = true;
@override
bool hasWorkingLibimobiledevice = true;
@override
bool hasIosDeploy = true;