Index: utils/tests/pub/oauth2_test.dart |
diff --git a/utils/tests/pub/oauth2_test.dart b/utils/tests/pub/oauth2_test.dart |
index 4529760e8ca050c12178d397906ef35b9c938962..62d4f9135e75ce28949b54028295f6b471fe4d76 100644 |
--- a/utils/tests/pub/oauth2_test.dart |
+++ b/utils/tests/pub/oauth2_test.dart |
@@ -31,7 +31,9 @@ main() { |
response.outputStream.close(); |
}); |
- pub.kill(); |
+ // After we give pub an invalid response, it should crash. We wait for it to |
+ // do so rather than killing it so it'll write out the credentials file. |
+ pub.shouldExit(1); |
Bob Nystrom
2013/02/05 00:53:22
Maybe add a pub.shouldFail(1) method so you don't
nweiz
2013/02/05 00:57:18
I don't think that makes sense to put on the actua
|
credentialsFile(server, 'access token').scheduleValidate(); |
}); |
@@ -112,7 +114,9 @@ main() { |
response.outputStream.close(); |
}); |
- pub.kill(); |
+ // After we give pub an invalid response, it should crash. We wait for it to |
+ // do so rather than killing it so it'll write out the credentials file. |
+ pub.shouldExit(1); |
credentialsFile(server, 'new access token').scheduleValidate(); |
}); |
@@ -135,7 +139,10 @@ main() { |
response.outputStream.close(); |
}); |
- pub.kill(); |
+ |
+ // After we give pub an invalid response, it should crash. We wait for it to |
+ // do so rather than killing it so it'll write out the credentials file. |
+ pub.shouldExit(1); |
credentialsFile(server, 'new access token').scheduleValidate(); |
}); |
@@ -190,7 +197,7 @@ void authorizePub(ScheduledProcess pub, ScheduledServer server, |
.send(); |
}).then((response) { |
expect(response.headers['location'], |
- equals(['http://pub.dartlang.org/authorized'])); |
+ equals('http://pub.dartlang.org/authorized')); |
}), anything); |
handleAccessTokenRequest(server, accessToken); |