diff options
| author | Jurriaan Pruis <[email protected]> | 2014-04-04 11:39:25 +0200 |
|---|---|---|
| committer | Jurriaan Pruis <[email protected]> | 2014-04-04 11:39:25 +0200 |
| commit | 5ccab460b65f597398f1d8a1b2a5a83039b80a9e (patch) | |
| tree | 6fa3a9e38f81e6f59693acf8861b12938d0030bf /test/workbook/tc_workbook_view.rb | |
| parent | c649ee7d5ac699d0fc5a36550f502216f9b7318f (diff) | |
| download | caxlsx-5ccab460b65f597398f1d8a1b2a5a83039b80a9e.tar.gz caxlsx-5ccab460b65f597398f1d8a1b2a5a83039b80a9e.zip | |
Fix boolean values so the output matches Excel and works on Numbers
Use 1 or 0 instead of 'true' or 'false' in the XML output
Diffstat (limited to 'test/workbook/tc_workbook_view.rb')
| -rw-r--r-- | test/workbook/tc_workbook_view.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/workbook/tc_workbook_view.rb b/test/workbook/tc_workbook_view.rb index 73f39a9c..2aa6521a 100644 --- a/test/workbook/tc_workbook_view.rb +++ b/test/workbook/tc_workbook_view.rb @@ -40,6 +40,9 @@ class TestWorkbookView < Test::Unit::TestCase xml = @book_view.to_xml_string doc = Nokogiri::XML(xml) @options.each do |key, value| + if value == true || value == false + value = value ? 1 : 0 + end path = "workbookView[@#{Axlsx.camel(key, false)}='#{value}']" assert_equal(1, doc.xpath(path).size) end |
