Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(325)

Unified Diff: pkg/oauth2/test/credentials_test.dart

Issue 187843006: pkg/oauth2 bringing tests into 2014 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: cl tweaks Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/oauth2/test/credentials_test.dart
diff --git a/pkg/oauth2/test/credentials_test.dart b/pkg/oauth2/test/credentials_test.dart
index f3e303b9af66ab0f657b585ff56d2119411c9c53..2ce9ec41427fdf684a454904751e5b3d47548c3b 100644
--- a/pkg/oauth2/test/credentials_test.dart
+++ b/pkg/oauth2/test/credentials_test.dart
@@ -43,19 +43,17 @@ void main() {
var credentials = new oauth2.Credentials(
'access token', null, tokenEndpoint);
expect(credentials.canRefresh, false);
- credentials.refresh('identifier', 'secret', httpClient: httpClient)
- .catchError(expectAsync1((error) {
- expect(error is StateError, isTrue);
- }));
+
+ expect(credentials.refresh('identifier', 'secret', httpClient: httpClient),
+ throwsStateError);
});
test("can't refresh without a token endpoint", () {
var credentials = new oauth2.Credentials('access token', 'refresh token');
expect(credentials.canRefresh, false);
- credentials.refresh('identifier', 'secret', httpClient: httpClient)
- .catchError(expectAsync1((error) {
- expect(error is StateError, isTrue);
- }));
+
+ expect(credentials.refresh('identifier', 'secret', httpClient: httpClient),
+ throwsStateError);
});
test("can refresh with a refresh token and a token endpoint", () {

Powered by Google App Engine
This is Rietveld 408576698