test: give the delete flags distinct values where params are asserted
The delete params tests set the delete files flag and the list exclusion flag both true, so swapping the two fields in the params builder produced identical params and no test noticed. The tests that assert a reset still set both true, since that is what proves both flags are cleared.
This commit is contained in:
4 files changed
+24
-24
No files matched your search
@@ -127,7 +127,7 @@ mod tests {
|
||||
app.push_navigation_stack(ActiveLidarrBlock::ArtistDetails.into());
|
||||
app.push_navigation_stack(ActiveLidarrBlock::DeleteAlbumPrompt.into());
|
||||
app.data.lidarr_data.prompt_confirm = true;
|
||||
app.data.lidarr_data.delete_files = true;
|
||||
app.data.lidarr_data.delete_files = false;
|
||||
app.data.lidarr_data.add_import_list_exclusion = true;
|
||||
app
|
||||
.data
|
||||
@@ -136,7 +136,7 @@ mod tests {
|
||||
.set_items(vec![Album::default()]);
|
||||
let expected_delete_album_params = DeleteParams {
|
||||
id: 0,
|
||||
delete_files: true,
|
||||
delete_files: false,
|
||||
add_import_list_exclusion: true,
|
||||
};
|
||||
app.data.lidarr_data.selected_block = BlockSelectionState::new(DELETE_ALBUM_SELECTION_BLOCKS);
|
||||
@@ -275,7 +275,7 @@ mod tests {
|
||||
app.push_navigation_stack(ActiveLidarrBlock::ArtistDetails.into());
|
||||
app.push_navigation_stack(ActiveLidarrBlock::DeleteAlbumPrompt.into());
|
||||
app.data.lidarr_data.delete_files = true;
|
||||
app.data.lidarr_data.add_import_list_exclusion = true;
|
||||
app.data.lidarr_data.add_import_list_exclusion = false;
|
||||
app
|
||||
.data
|
||||
.lidarr_data
|
||||
@@ -284,7 +284,7 @@ mod tests {
|
||||
let expected_delete_album_params = DeleteParams {
|
||||
id: 0,
|
||||
delete_files: true,
|
||||
add_import_list_exclusion: true,
|
||||
add_import_list_exclusion: false,
|
||||
};
|
||||
app.data.lidarr_data.selected_block = BlockSelectionState::new(DELETE_ALBUM_SELECTION_BLOCKS);
|
||||
app
|
||||
@@ -352,11 +352,11 @@ mod tests {
|
||||
.albums
|
||||
.set_items(vec![Album::default()]);
|
||||
app.data.lidarr_data.delete_files = true;
|
||||
app.data.lidarr_data.add_import_list_exclusion = true;
|
||||
app.data.lidarr_data.add_import_list_exclusion = false;
|
||||
let expected_delete_album_params = DeleteParams {
|
||||
id: 0,
|
||||
delete_files: true,
|
||||
add_import_list_exclusion: true,
|
||||
add_import_list_exclusion: false,
|
||||
};
|
||||
|
||||
let delete_album_params = DeleteAlbumHandler::new(
|
||||
|
||||
Reference in new issue
Block a user