[verified] Publish ReelBox source under GPLv3

This commit is contained in:
Hermes committed 2026-11-12 23:41:13 +00:00
commit db2b505ca3
445 files changed
+105274

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
import 'package:background_downloader/background_downloader.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:reelbox/media/download_service.dart';
void main() {
test('new downloads have no stale notification templates after opt out', () {
final service = DownloadService.instance;
service.configureNotifications(true);
final enabledTask = DownloadTask(
url: 'https://example.test/a.mp4',
group: DownloadService.group,
notificationConfig: service.notificationConfigForNewTask,
);
expect(enabledTask.notificationConfig?.complete, isNotNull);
service.configureNotifications(false);
final disabledTask = DownloadTask(
url: 'https://example.test/b.mp4',
group: DownloadService.group,
notificationConfig: service.notificationConfigForNewTask,
);
expect(disabledTask.notificationConfig, isNull);
// Changing the preference does not lie about altering an active OS job.
expect(enabledTask.notificationConfig?.running, isNotNull);
});
}