diff options
| author | Josef Šimánek <[email protected]> | 2021-12-10 03:16:58 +0100 |
|---|---|---|
| committer | Josef Šimánek <[email protected]> | 2022-02-07 17:20:43 +0100 |
| commit | c027feff583a09d5d6803e666bdbfca87653329d (patch) | |
| tree | 1f8367b7f7bf29bfacc2ae593d3e9870fcaaafd7 /test/workbook/tc_workbook.rb | |
| parent | be9b3e6ee9dca0e0377ae8f3b14d007ad494b7e6 (diff) | |
| download | caxlsx-c027feff583a09d5d6803e666bdbfca87653329d.tar.gz caxlsx-c027feff583a09d5d6803e666bdbfca87653329d.zip | |
Validate name option to be non-empty string when passed.
Diffstat (limited to 'test/workbook/tc_workbook.rb')
| -rw-r--r-- | test/workbook/tc_workbook.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/workbook/tc_workbook.rb b/test/workbook/tc_workbook.rb index c2f8ebd6..f8d0b1f7 100644 --- a/test/workbook/tc_workbook.rb +++ b/test/workbook/tc_workbook.rb @@ -46,6 +46,11 @@ class TestWorkbook < Test::Unit::TestCase assert_equal('foo', @wb.sheet_by_name('foo').name) end + + def test_worksheet_empty_name + assert_raise(ArgumentError) {@wb.add_worksheet(:name=>'')} + end + def test_date1904 assert_equal(Axlsx::Workbook.date1904, @wb.date1904) @wb.date1904 = :false |
