feat(updates): switch auto-updates to GitHub releases and remove Gitea references (v3.0.1)
Build and Release / Build Windows x64 (push) Has been cancelled
Build and Release / Build Windows x64 (push) Has been cancelled
This commit is contained in:
@@ -6,7 +6,7 @@ import 'package:gel_rule_app/backend/services/update_service.dart';
|
||||
import 'package:gel_rule_app/core/database/database_service.dart';
|
||||
|
||||
void main() {
|
||||
test('UpdateService parses Gitea release JSON correctly', () {
|
||||
test('UpdateService parses GitHub release JSON correctly', () {
|
||||
final service = UpdateService(Dio(), SettingsService(_MockDatabaseService()));
|
||||
|
||||
// Use reflection or constructor to test info
|
||||
@@ -15,21 +15,21 @@ void main() {
|
||||
tagName: 'v2.0.2',
|
||||
name: 'Lunaris 2.0.2',
|
||||
body: 'Release notes',
|
||||
htmlUrl: 'https://gitea.rardogsynapse.online/RarDog/Lunaris/releases/tag/v2.0.2',
|
||||
htmlUrl: 'https://github.com/RarDog/Lunaris/releases/tag/v2.0.2',
|
||||
publishedAt: DateTime.parse('2026-09-03T18:00:00Z'),
|
||||
apkUrl: 'https://gitea.rardogsynapse.online/attachments/apk',
|
||||
linuxTarGzUrl: 'https://gitea.rardogsynapse.online/attachments/linux',
|
||||
apkUrl: 'https://github.com/RarDog/Lunaris/releases/download/v2.0.2/Lunaris.apk',
|
||||
linuxTarGzUrl: 'https://github.com/RarDog/Lunaris/releases/download/v2.0.2/linux.tar.gz',
|
||||
);
|
||||
|
||||
expect(info.hasAssets, isTrue);
|
||||
expect(info.apkUrl, contains('apk'));
|
||||
expect(info.linuxTarGzUrl, contains('linux'));
|
||||
expect(
|
||||
service.assetFileName(info, 'https://gitea.rardogsynapse.online/attachments/Lunaris-v2.0.2.apk'),
|
||||
service.assetFileName(info, 'https://github.com/RarDog/Lunaris/releases/download/v2.0.2/Lunaris-v2.0.2.apk'),
|
||||
'Lunaris-v2.0.2.apk',
|
||||
);
|
||||
expect(
|
||||
service.assetFileName(info, info.apkUrl!),
|
||||
service.assetFileName(info, 'https://github.com/RarDog/Lunaris/releases/download/v2.0.2/unknown-linux'),
|
||||
'Lunaris-v2.0.2-linux-x64.tar.gz',
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user