FIX: Adds tests

This commit is contained in:
Nicolás Hatcher
2024-02-14 10:11:15 +01:00
parent 1ee5c6a151
commit 9e548de2aa
3 changed files with 24 additions and 2 deletions

View File

@@ -38,6 +38,7 @@ mod test_sheet_markup;
mod test_sheets;
mod test_styles;
mod test_trigonometric;
mod test_workbook;
mod test_worksheet;
pub(crate) mod util;
@@ -47,6 +48,7 @@ mod test_number_format;
mod test_escape_quotes;
mod test_fn_type;
mod test_frozen_rows_and_columns;
mod test_get_cell_content;
mod test_percentage;
mod test_today;

View File

@@ -1,7 +1,9 @@
#![allow(clippy::unwrap_used)]
use crate::expressions::utils::{LAST_COLUMN, LAST_ROW};
use crate::test::util::new_empty_model;
use crate::{
constants::{LAST_COLUMN, LAST_ROW},
test::util::new_empty_model,
};
#[test]
fn test_empty_model() {

View File

@@ -0,0 +1,18 @@
#![allow(clippy::unwrap_used)]
use crate::{test::util::new_empty_model, types::SheetInfo};
#[test]
fn workbook_worksheets_info() {
let model = new_empty_model();
let sheets_info = model.workbook.get_worksheets_info();
assert_eq!(
sheets_info[0],
SheetInfo {
name: "Sheet1".to_string(),
state: "visible".to_string(),
sheet_id: 1,
color: None
}
);
}