platform/test/uri_decode_test.dart
2017-11-24 19:26:06 -05:00

18 lines
471 B
Dart

import 'package:angel_route/angel_route.dart';
import 'package:test/test.dart';
void main() {
test('uri params decoded', () {
var router = new Router()..get('/a/:a/b/:b', '');
var encoded =
'/a/' + Uri.encodeComponent('<<<') + '/b/' + Uri.encodeComponent('???');
print(encoded);
var result = router.resolveAbsolute(encoded).first;
print(result.allParams);
expect(result.allParams, {
'a': '<<<',
'b': '???',
});
});
}