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

Side by Side Diff: test/lish/package_creation_provides_invalid_json_test.dart

Issue 1215833002: Use the new test runner. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'package:scheduled_test/scheduled_test.dart'; 5 import 'package:scheduled_test/scheduled_test.dart';
6 import 'package:scheduled_test/scheduled_server.dart'; 6 import 'package:scheduled_test/scheduled_server.dart';
7 import 'package:shelf/shelf.dart' as shelf; 7 import 'package:shelf/shelf.dart' as shelf;
8 8
9 import '../descriptor.dart' as d; 9 import '../descriptor.dart' as d;
10 import '../test_pub.dart'; 10 import '../test_pub.dart';
11 import 'utils.dart'; 11 import 'utils.dart';
12 12
13 main() { 13 main() {
14 initConfig();
15 setUp(d.validPackage.create); 14 setUp(d.validPackage.create);
16 15
17 integration('package creation provides invalid JSON', () { 16 integration('package creation provides invalid JSON', () {
18 var server = new ScheduledServer(); 17 var server = new ScheduledServer();
19 d.credentialsFile(server, 'access token').create(); 18 d.credentialsFile(server, 'access token').create();
20 var pub = startPublish(server); 19 var pub = startPublish(server);
21 20
22 confirmPublish(pub); 21 confirmPublish(pub);
23 handleUploadForm(server); 22 handleUploadForm(server);
24 handleUpload(server); 23 handleUpload(server);
25 24
26 server.handle('GET', '/create', (request) { 25 server.handle('GET', '/create', (request) {
27 return new shelf.Response.ok('{not json'); 26 return new shelf.Response.ok('{not json');
28 }); 27 });
29 28
30 pub.stderr.expect(emitsLines( 29 pub.stderr.expect(emitsLines(
31 'Invalid server response:\n' 30 'Invalid server response:\n'
32 '{not json')); 31 '{not json'));
33 pub.shouldExit(1); 32 pub.shouldExit(1);
34 }); 33 });
35 } 34 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698