platform/test/router/use.dart

18 lines
428 B
Dart
Raw Normal View History

2016-10-20 09:21:59 +00:00
import 'package:angel_route/angel_route.dart';
import 'package:test/test.dart';
main() {
final parent = new Router()..debug = true;
final child = new Router()..debug = true;
final a = child.get('a', ['c']);
parent.use('child', child);
parent.dumpTree();
group('no params', () {
test('resolve', () {
expect(parent.resolve('child/a'), equals(a));
expect(parent.resolve('a'), isNull);
});
});
}