OLD | NEW |
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 | 6 |
7 import '../../lib/src/entrypoint.dart'; | 7 import '../../lib/src/entrypoint.dart'; |
8 import '../../lib/src/validator.dart'; | 8 import '../../lib/src/validator.dart'; |
9 import '../../lib/src/validator/pubspec_field.dart'; | 9 import '../../lib/src/validator/pubspec_field.dart'; |
10 import '../descriptor.dart' as d; | 10 import '../descriptor.dart' as d; |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 integration('has a non-string member of the "authors" field', () { | 108 integration('has a non-string member of the "authors" field', () { |
109 var pkg = packageMap("test_pkg", "1.0.0"); | 109 var pkg = packageMap("test_pkg", "1.0.0"); |
110 pkg["authors"] = [12]; | 110 pkg["authors"] = [12]; |
111 d.dir(appPath, [d.pubspec(pkg)]).create(); | 111 d.dir(appPath, [d.pubspec(pkg)]).create(); |
112 | 112 |
113 expectValidationError(pubspecField); | 113 expectValidationError(pubspecField); |
114 }); | 114 }); |
115 | 115 |
116 integration('has a single author without an email', () { | 116 integration('has a single author without an email', () { |
117 var pkg = packageMap("test_pkg", "1.0.0"); | 117 var pkg = packageMap("test_pkg", "1.0.0"); |
118 pkg["author"] = "Nathan Weizenbaum"; | 118 pkg["author"] = "Natalie Weizenbaum"; |
119 d.dir(appPath, [d.pubspec(pkg)]).create(); | 119 d.dir(appPath, [d.pubspec(pkg)]).create(); |
120 | 120 |
121 expectValidationWarning(pubspecField); | 121 expectValidationWarning(pubspecField); |
122 }); | 122 }); |
123 | 123 |
124 integration('has one of several authors without an email', () { | 124 integration('has one of several authors without an email', () { |
125 var pkg = packageMap("test_pkg", "1.0.0"); | 125 var pkg = packageMap("test_pkg", "1.0.0"); |
126 pkg.remove("author"); | 126 pkg.remove("author"); |
127 pkg["authors"] = [ | 127 pkg["authors"] = [ |
128 "Bob Nystrom <rnystrom@google.com>", | 128 "Bob Nystrom <rnystrom@google.com>", |
129 "Nathan Weizenbaum", | 129 "Natalie Weizenbaum", |
130 "John Messerly <jmesserly@google.com>" | 130 "John Messerly <jmesserly@google.com>" |
131 ]; | 131 ]; |
132 d.dir(appPath, [d.pubspec(pkg)]).create(); | 132 d.dir(appPath, [d.pubspec(pkg)]).create(); |
133 | 133 |
134 expectValidationWarning(pubspecField); | 134 expectValidationWarning(pubspecField); |
135 }); | 135 }); |
136 | 136 |
137 integration('has a single author without a name', () { | 137 integration('has a single author without a name', () { |
138 var pkg = packageMap("test_pkg", "1.0.0"); | 138 var pkg = packageMap("test_pkg", "1.0.0"); |
139 pkg["author"] = "<nweiz@google.com>"; | 139 pkg["author"] = "<nweiz@google.com>"; |
(...skipping 25 matching lines...) Expand all Loading... |
165 | 165 |
166 integration('has a non-HTTP documentation URL', () { | 166 integration('has a non-HTTP documentation URL', () { |
167 var pkg = packageMap("test_pkg", "1.0.0"); | 167 var pkg = packageMap("test_pkg", "1.0.0"); |
168 pkg["documentation"] = "file:///foo/bar"; | 168 pkg["documentation"] = "file:///foo/bar"; |
169 d.dir(appPath, [d.pubspec(pkg)]).create(); | 169 d.dir(appPath, [d.pubspec(pkg)]).create(); |
170 | 170 |
171 expectValidationError(pubspecField); | 171 expectValidationError(pubspecField); |
172 }); | 172 }); |
173 }); | 173 }); |
174 } | 174 } |
OLD | NEW |