test(readarr): populate the book fixture with statistics
The shared Book fixture left statistics as None, so every author details snapshot rendered the missing-statistics N/A cells and the populated branch of the Files and Size columns was only exercised by one test. Give the fixture distinct, non-default counts and a size that formats to a value different from the dedicated statistics test.
This commit is contained in:
11 files changed
+18
-12
No files matched your search
@@ -31,8 +31,8 @@ use strum::EnumIter;
|
||||
use {
|
||||
super::modals::EditionDetailsModal,
|
||||
crate::models::readarr_models::{
|
||||
AuthorStatus, BookFile, DownloadStatus, Edition, MediaInfo, MonitorType, NewItemMonitorType,
|
||||
Ratings, ReadarrHistoryEventType, ReadarrTaskName,
|
||||
AuthorStatus, BookFile, BookStatistics, DownloadStatus, Edition, MediaInfo, MonitorType,
|
||||
NewItemMonitorType, Ratings, ReadarrHistoryEventType, ReadarrTaskName,
|
||||
},
|
||||
crate::models::servarr_models::{IndexerField, Quality, QualityWrapper},
|
||||
crate::models::stateful_table::SortOption,
|
||||
@@ -292,6 +292,12 @@ impl ReadarrData<'_> {
|
||||
any_edition_ok: true,
|
||||
page_count: Some(288),
|
||||
release_date: Some(date),
|
||||
statistics: Some(BookStatistics {
|
||||
book_file_count: 3,
|
||||
total_book_count: 7,
|
||||
size_on_disk: 2469606195,
|
||||
percent_of_books: 42.86,
|
||||
}),
|
||||
..Book::default()
|
||||
};
|
||||
let readarr_history_item = ReadarrHistoryItem {
|
||||
|
||||
Reference in new issue
Block a user