Skip to content

Commit

Permalink
FIX: Adds one more test
Browse files Browse the repository at this point in the history
  • Loading branch information
nhatcher committed Feb 14, 2024
1 parent 9e548de commit 8fc4d58
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions base/src/test/test_workbook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,16 @@ fn workbook_worksheets_info() {
}
);
}

#[test]
fn workbook_worksheets_ids_and_names() {
let mut model = new_empty_model();
assert!(model.add_sheet("New Sheet").is_ok());
assert!(model.add_sheet("Newer Sheet").is_ok());

let sheet_ids = model.workbook.get_worksheet_ids();
assert_eq!(sheet_ids, vec![1, 2, 3]);

let sheet_names = model.workbook.get_worksheet_names();
assert_eq!(sheet_names, vec!["Sheet1", "New Sheet", "Newer Sheet"]);
}

0 comments on commit 8fc4d58

Please sign in to comment.