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

Side by Side Diff: utils/tests/pub/validator_test.dart

Issue 11466020: Require a homepage field in pubspecs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « utils/tests/pub/test_pub.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 library validator_test; 5 library validator_test;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 import 'dart:json'; 8 import 'dart:json';
9 9
10 import 'test_pub.dart'; 10 import 'test_pub.dart';
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 group('should consider a package invalid if it', () { 49 group('should consider a package invalid if it', () {
50 test('is missing the "homepage" field', () { 50 test('is missing the "homepage" field', () {
51 var package = package("test_pkg", "1.0.0"); 51 var package = package("test_pkg", "1.0.0");
52 package.remove("homepage"); 52 package.remove("homepage");
53 dir(appPath, [pubspec(package)]).scheduleCreate(); 53 dir(appPath, [pubspec(package)]).scheduleCreate();
54 54
55 expectValidationError(pubspecField); 55 expectValidationError(pubspecField);
56 run(); 56 run();
57 }); 57 });
58 58
59 test('is missing the "description" field', () {
60 var package = package("test_pkg", "1.0.0");
61 package.remove("description");
62 dir(appPath, [pubspec(package)]).scheduleCreate();
63
64 expectValidationError(pubspecField);
65 run();
66 });
67
59 test('is missing the "author" field', () { 68 test('is missing the "author" field', () {
60 var package = package("test_pkg", "1.0.0"); 69 var package = package("test_pkg", "1.0.0");
61 package.remove("author"); 70 package.remove("author");
62 dir(appPath, [pubspec(package)]).scheduleCreate(); 71 dir(appPath, [pubspec(package)]).scheduleCreate();
63 72
64 expectValidationError(pubspecField); 73 expectValidationError(pubspecField);
65 run(); 74 run();
66 }); 75 });
67 76
68 test('has a single author without an email', () { 77 test('has a single author without an email', () {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 "<nweiz@google.com>", 114 "<nweiz@google.com>",
106 "John Messerly <jmesserly@google.com>" 115 "John Messerly <jmesserly@google.com>"
107 ]; 116 ];
108 dir(appPath, [pubspec(package)]).scheduleCreate(); 117 dir(appPath, [pubspec(package)]).scheduleCreate();
109 118
110 expectValidationWarning(pubspecField); 119 expectValidationWarning(pubspecField);
111 run(); 120 run();
112 }); 121 });
113 }); 122 });
114 } 123 }
OLDNEW
« no previous file with comments | « utils/tests/pub/test_pub.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698