summaryrefslogtreecommitdiffhomepage
path: root/test/workbook/worksheet/tc_worksheet.rb
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2013-09-29 13:16:22 +0900
committerRandy Morgan <[email protected]>2013-09-29 13:16:22 +0900
commit2d604bd4a7463d6f248e103f24246e53973c71aa (patch)
tree7e89d913b128d5d074f94a1b1e6030470687a8fc /test/workbook/worksheet/tc_worksheet.rb
parent097b7da7eb6b29907da28c174e83ff22a6358176 (diff)
downloadcaxlsx-2d604bd4a7463d6f248e103f24246e53973c71aa.tar.gz
caxlsx-2d604bd4a7463d6f248e103f24246e53973c71aa.zip
Integrate workbook views and alter serialization
This integrates workbook views and sheet state into serialization. I also noticed that we were populating defined names during serialization. While it is good to delay this as late as possible as there is always the chance that some conditional programming by the consumer adds, and then removes an autofilter, I am choosing to risk it at this point for cleaner code.
Diffstat (limited to 'test/workbook/worksheet/tc_worksheet.rb')
-rw-r--r--test/workbook/worksheet/tc_worksheet.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/workbook/worksheet/tc_worksheet.rb b/test/workbook/worksheet/tc_worksheet.rb
index 3782b215..b83613b4 100644
--- a/test/workbook/worksheet/tc_worksheet.rb
+++ b/test/workbook/worksheet/tc_worksheet.rb
@@ -73,6 +73,15 @@ class TestWorksheet < Test::Unit::TestCase
end
end
+ def test_state
+ assert_equal(:visible, @ws.state)
+ end
+
+ def test_state_validation
+ assert_raise(ArgumentError) { @ws.state = :dead }
+ assert_nothing_raised { @ws.state = :very_hidden }
+ end
+
def test_no_autowidth
@ws.workbook.use_autowidth = false
@ws.add_row [1,2,3,4]