chore: Halkyon Learn moves into apps/learn

Its server, client, app and curator, and the tools that write its
assets (maps, Anki fixtures, icons), as they are; paths are fixed in
the commits that follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-19 20:08:06 +02:00
commit 649499be23
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -0,0 +1,59 @@
import 'package:halkyon_learn_server/src/auth/learn_base.dart';
import 'package:halkyon_learn_server/src/instance/app_compatibility.dart';
import 'package:test/test.dart';
import '../support/auth_fixtures.dart';
import '../test_tools/serverpod_test_tools.dart';
void main() {
withServerpod('What the instance offers', (sessionBuilder, endpoints) {
setUp(() => useLearnBase(sessionBuilder));
test('names this repository as the source when the operator set '
'nothing', () async {
// The tests run without SOURCE_URL.
final info = await endpoints.instance.info(
sessionBuilder.copyWith(
authentication: AuthenticationOverride.unauthenticated(),
),
);
expect(info.sourceCodeUrl, upstreamSourceCodeUrl);
});
test('names the oldest app build it still works with, to anyone, so an '
'older app can say it needs an update', () async {
final info = await endpoints.instance.info(
sessionBuilder.copyWith(
authentication: AuthenticationOverride.unauthenticated(),
),
);
expect(info.minimumAppBuild, minimumAppBuild);
});
test('suggests no Jellyfin server where the operator set none and the '
'instance has no domain of its own (localhost)', () async {
final info = await endpoints.instance.info(
sessionBuilder.copyWith(
authentication: AuthenticationOverride.unauthenticated(),
),
);
expect(info.jellyfinUrl, isNull);
});
test('says nothing of where its data and backups are where the '
'operator said nothing', () async {
// The tests run without DATA_LOCATION and BACKUP_LOCATION.
final info = await endpoints.instance.info(
sessionBuilder.copyWith(
authentication: AuthenticationOverride.unauthenticated(),
),
);
expect(info.dataLocation, isNull);
expect(info.backupLocation, isNull);
});
});
}