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

Unified Diff: utils/tests/pub/oauth2_test.dart

Issue 11943005: Make integration tests a bit cleaner. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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
« no previous file with comments | « utils/tests/pub/install/sdk/check_out_transitive_test.dart ('k') | utils/tests/pub/pub_lish_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/pub/oauth2_test.dart
diff --git a/utils/tests/pub/oauth2_test.dart b/utils/tests/pub/oauth2_test.dart
index 1c94c32e52b70618e43c035eebf0359ea9fbcb38..42be210807bf93c5f639898113d41dac98121df4 100644
--- a/utils/tests/pub/oauth2_test.dart
+++ b/utils/tests/pub/oauth2_test.dart
@@ -9,6 +9,7 @@ import 'dart:json' as json;
import 'dart:uri';
import 'test_pub.dart';
+import 'test_pub.dart';
import '../../../pkg/http/lib/http.dart' as http;
import '../../../pkg/unittest/lib/unittest.dart';
import '../../pub/io.dart';
@@ -17,8 +18,8 @@ import '../../pub/utils.dart';
main() {
setUp(() => normalPackage.scheduleCreate());
- test('with no credentials.json, authenticates and saves credentials.json',
- () {
+ integration('with no credentials.json, authenticates and saves '
+ 'credentials.json', () {
var server = new ScheduledServer();
var pub = startPubLish(server);
confirmPublish(pub);
@@ -34,11 +35,9 @@ main() {
pub.kill();
credentialsFile(server, 'access token').scheduleValidate();
-
- run();
});
- test('with a pre-existing credentials.json does not authenticate', () {
+ integration('with a pre-existing credentials.json does not authenticate', () {
var server = new ScheduledServer();
credentialsFile(server, 'access token').scheduleCreate();
var pub = startPubLish(server);
@@ -52,12 +51,10 @@ main() {
});
pub.kill();
-
- run();
});
- test('with an expired credentials.json, refreshes and saves the refreshed '
- 'access token to credentials.json', () {
+ integration('with an expired credentials.json, refreshes and saves the '
+ 'refreshed access token to credentials.json', () {
var server = new ScheduledServer();
credentialsFile(server, 'access token',
refreshToken: 'refresh token',
@@ -93,11 +90,9 @@ main() {
credentialsFile(server, 'new access token', refreshToken: 'refresh token')
.scheduleValidate();
-
- run();
});
- test('with an expired credentials.json without a refresh token, '
+ integration('with an expired credentials.json without a refresh token, '
'authenticates again and saves credentials.json', () {
var server = new ScheduledServer();
credentialsFile(server, 'access token',
@@ -121,12 +116,10 @@ main() {
pub.kill();
credentialsFile(server, 'new access token').scheduleValidate();
-
- run();
});
- test('with a malformed credentials.json, authenticates again and saves '
- 'credentials.json', () {
+ integration('with a malformed credentials.json, authenticates again and '
+ 'saves credentials.json', () {
var server = new ScheduledServer();
dir(cachePath, [
file('credentials.json', '{bad json')
@@ -146,11 +139,9 @@ main() {
pub.kill();
credentialsFile(server, 'new access token').scheduleValidate();
-
- run();
});
- test('with server-rejected credentials, authenticates again and saves '
+ integration('with server-rejected credentials, authenticates again and saves '
'credentials.json', () {
var server = new ScheduledServer();
credentialsFile(server, 'access token').scheduleCreate();
@@ -177,7 +168,6 @@ main() {
'Looks great! Are you ready to upload your package (y/n)? '
'Pub needs your authorization to upload packages on your behalf.'));
pub.kill();
- run();
});
}
« no previous file with comments | « utils/tests/pub/install/sdk/check_out_transitive_test.dart ('k') | utils/tests/pub/pub_lish_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698