19 lines
604 B
Dart
19 lines
604 B
Dart
|
|
import 'package:halkyon_base_server/base.dart';
|
||
|
|
import 'package:test/test.dart';
|
||
|
|
|
||
|
|
void main() {
|
||
|
|
test("the operator's source URL counts only where they set one", () {
|
||
|
|
expect(
|
||
|
|
sourceCodeUrlFrom('https://code.example.org/fork'),
|
||
|
|
'https://code.example.org/fork',
|
||
|
|
);
|
||
|
|
expect(
|
||
|
|
sourceCodeUrlFrom(' https://code.example.org/fork '),
|
||
|
|
'https://code.example.org/fork',
|
||
|
|
);
|
||
|
|
// Compose passes unset variables on as empty strings.
|
||
|
|
expect(sourceCodeUrlFrom(''), isNull);
|
||
|
|
expect(sourceCodeUrlFrom(' '), isNull);
|
||
|
|
expect(sourceCodeUrlFrom(null), isNull);
|
||
|
|
});
|
||
|
|
}
|