OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 'dart:convert'; | 5 import 'dart:convert'; |
6 | 6 |
| 7 import 'package:pub/src/io.dart'; |
7 import 'package:scheduled_test/scheduled_test.dart'; | 8 import 'package:scheduled_test/scheduled_test.dart'; |
8 import 'package:scheduled_test/scheduled_server.dart'; | 9 import 'package:scheduled_test/scheduled_server.dart'; |
9 import 'package:shelf/shelf.dart' as shelf; | 10 import 'package:shelf/shelf.dart' as shelf; |
10 | 11 |
11 import '../../lib/src/io.dart'; | |
12 import '../descriptor.dart' as d; | 12 import '../descriptor.dart' as d; |
13 import '../test_pub.dart'; | 13 import '../test_pub.dart'; |
14 import 'utils.dart'; | 14 import 'utils.dart'; |
15 | 15 |
16 main() { | 16 main() { |
17 initConfig(); | 17 initConfig(); |
18 // Regression test for issue 8849. | 18 // Regression test for issue 8849. |
19 integration('with a server-rejected refresh token, authenticates again and ' | 19 integration('with a server-rejected refresh token, authenticates again and ' |
20 'saves credentials.json', () { | 20 'saves credentials.json', () { |
21 d.validPackage.create(); | 21 d.validPackage.create(); |
(...skipping 22 matching lines...) Expand all Loading... |
44 server.handle('GET', '/api/packages/versions/new', (request) { | 44 server.handle('GET', '/api/packages/versions/new', (request) { |
45 expect(request.headers, | 45 expect(request.headers, |
46 containsPair('authorization', 'Bearer new access token')); | 46 containsPair('authorization', 'Bearer new access token')); |
47 | 47 |
48 return new shelf.Response(200); | 48 return new shelf.Response(200); |
49 }); | 49 }); |
50 | 50 |
51 pub.kill(); | 51 pub.kill(); |
52 }); | 52 }); |
53 } | 53 } |
OLD | NEW |