You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
565 B
16 lines
565 B
1 year ago
|
import 'package:dynamite_runtime/src/uri.dart';
|
||
|
import 'package:test/test.dart';
|
||
|
|
||
|
void main() {
|
||
|
test('UriExtension', () {
|
||
|
var uri = Uri(scheme: 'https', host: 'example.com', path: '/');
|
||
|
expect(uri.normalizeEmptyPath().toString(), 'https://example.com');
|
||
|
|
||
|
uri = Uri(scheme: 'https', host: 'example.com', path: '/slug');
|
||
|
expect(uri.normalizeEmptyPath().toString(), 'https://example.com/slug');
|
||
|
|
||
|
uri = Uri(scheme: 'https', host: 'example.com', path: '/slug/');
|
||
|
expect(uri.normalizeEmptyPath().toString(), 'https://example.com/slug');
|
||
|
});
|
||
|
}
|