mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-11 16:30:28 +00:00
fix: Tighten device settings layout
This commit is contained in:
25
test/providers/channels_provider_test.dart
Normal file
25
test/providers/channels_provider_test.dart
Normal file
@@ -0,0 +1,25 @@
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:meshcore_sar_app/providers/channels_provider.dart';
|
||||
|
||||
void main() {
|
||||
group('ChannelsProvider device sync preparation', () {
|
||||
test('clears runtime channel state before sync', () {
|
||||
final provider = ChannelsProvider();
|
||||
|
||||
provider.addOrUpdateChannel(
|
||||
index: 2,
|
||||
name: 'Ops',
|
||||
secret: Uint8List.fromList(List<int>.filled(16, 7)),
|
||||
);
|
||||
provider.selectChannel(2);
|
||||
|
||||
provider.prepareForDeviceSync();
|
||||
|
||||
expect(provider.channels, isEmpty);
|
||||
expect(provider.selectedChannelIndex, 0);
|
||||
expect(provider.selectedChannel, isNull);
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user