Merge Tanemaki → Tane rename into main

This commit is contained in:
vjrj 2026-07-12 13:37:25 +02:00
commit e65d82017a
66 changed files with 293 additions and 293 deletions

View file

@ -3,7 +3,7 @@ import 'package:tane/data/export_import/seed_label_codec.dart';
void main() {
group('SeedLabelCodec.encode', () {
test('encodes all fields as a tanemaki://seed URI', () {
test('encodes all fields as a tane://seed URI', () {
final uri = SeedLabelCodec.encode(
const SeedLabelData(
varietyLabel: 'Acelga de Perales',
@ -13,9 +13,9 @@ void main() {
origin: 'Perales',
),
);
expect(uri, startsWith('tanemaki://seed?'));
expect(uri, startsWith('tane://seed?'));
final parsed = Uri.parse(uri);
expect(parsed.scheme, 'tanemaki');
expect(parsed.scheme, 'tane');
expect(parsed.host, 'seed');
expect(parsed.queryParameters, {
'v': 'Acelga de Perales',
@ -74,15 +74,15 @@ void main() {
group('SeedLabelCodec.decode', () {
test('rejects a foreign scheme', () {
expect(SeedLabelCodec.decode('https://seed?v=x'), isNull);
expect(SeedLabelCodec.decode('tanemaki://other?v=x'), isNull);
expect(SeedLabelCodec.decode('tane://other?v=x'), isNull);
});
test('rejects a payload without a variety', () {
expect(SeedLabelCodec.decode('tanemaki://seed?s=Beta%20vulgaris'), isNull);
expect(SeedLabelCodec.decode('tane://seed?s=Beta%20vulgaris'), isNull);
});
test('ignores an unparseable year rather than throwing', () {
final decoded = SeedLabelCodec.decode('tanemaki://seed?v=Maíz&y=old');
final decoded = SeedLabelCodec.decode('tane://seed?v=Maíz&y=old');
expect(decoded?.varietyLabel, 'Maíz');
expect(decoded?.year, isNull);
});