A framework for building convergent cross-platform Nextcloud clients using Flutter.
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.
|
|
|
import 'package:dynamite_runtime/src/utils/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');
|
|
|
|
});
|
|
|
|
}
|