Skip to content

Commit

Permalink
fix for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
git-elliot committed Nov 20, 2024
1 parent e8a5cc7 commit 03733cf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/pages/host_scan_page/host_scan_bloc/host_scan_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,13 @@ class HostScanBloc extends Bloc<HostScanEvent, HostScanState> {
}
if (gatewayIp == null) {
emit(const HostScanState.error());
return;
return Future.error('Can not get wifi details');

Check warning on line 82 in lib/pages/host_scan_page/host_scan_bloc/host_scan_bloc.dart

View check run for this annotation

Codecov / codecov/patch

lib/pages/host_scan_page/host_scan_bloc/host_scan_bloc.dart#L82

Added line #L82 was not covered by tests
}
subnet = gatewayIp!.substring(0, gatewayIp!.lastIndexOf('.'));
if (subnet == null) {
emit(const HostScanState.error());
return Future.error('Can not get wifi details');

Check warning on line 87 in lib/pages/host_scan_page/host_scan_bloc/host_scan_bloc.dart

View check run for this annotation

Codecov / codecov/patch

lib/pages/host_scan_page/host_scan_bloc/host_scan_bloc.dart#L86-L87

Added lines #L86 - L87 were not covered by tests
}
if (appSettings.runScanOnStartup) {
add(const HostScanEvent.loadScan());

Check warning on line 90 in lib/pages/host_scan_page/host_scan_bloc/host_scan_bloc.dart

View check run for this annotation

Codecov / codecov/patch

lib/pages/host_scan_page/host_scan_bloc/host_scan_bloc.dart#L90

Added line #L90 was not covered by tests
} else {
Expand Down

0 comments on commit 03733cf

Please sign in to comment.