diff options
| author | sato-s <[email protected]> | 2016-11-14 17:34:27 +0900 |
|---|---|---|
| committer | sato-s <[email protected]> | 2016-11-14 17:34:27 +0900 |
| commit | 5a7e890c40e8ec2f9669eb130721397bc97f0d38 (patch) | |
| tree | b40b556ecf457487f18e5ae61b59ed303cf2e772 /test | |
| parent | fe80334f213e3dc149f560a50d90d09054f519fe (diff) | |
| download | caxlsx-5a7e890c40e8ec2f9669eb130721397bc97f0d38.tar.gz caxlsx-5a7e890c40e8ec2f9669eb130721397bc97f0d38.zip | |
Test case to check sheet name is intact after serialized to xml
Diffstat (limited to 'test')
| -rw-r--r-- | test/workbook/tc_workbook.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/workbook/tc_workbook.rb b/test/workbook/tc_workbook.rb index 51dd01f4..ab400db1 100644 --- a/test/workbook/tc_workbook.rb +++ b/test/workbook/tc_workbook.rb @@ -136,4 +136,10 @@ class TestWorkbook < Test::Unit::TestCase doc = Nokogiri::XML(@wb.to_xml_string) assert_equal pivot_table.cache_definition.rId, doc.xpath("//xmlns:pivotCache").first["r:id"] end + + def test_worksheet_name_is_intact_after_serialized_into_xml + sheet = @wb.add_worksheet(:name => '_Example') + wb_xml = Nokogiri::XML(@wb.to_xml_string) + assert_equal sheet.name, wb_xml.xpath('//xmlns:workbook/xmlns:sheets/*[1]/@name').to_s + end end |
