diff options
| author | Randy Morgan <[email protected]> | 2012-05-15 11:23:59 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-05-15 11:23:59 +0900 |
| commit | 2d744ba77906d460b608859c945a5741ec725e42 (patch) | |
| tree | 0366b619ea15909d230a2fa485a95d395486d6cf /test/workbook/worksheet/tc_col.rb | |
| parent | 2e1e14dd8f91e8a1416faae9501fdf04638104c7 (diff) | |
| download | caxlsx-2d744ba77906d460b608859c945a5741ec725e42.tar.gz caxlsx-2d744ba77906d460b608859c945a5741ec725e42.zip | |
bring coverage up to 100% and patch a few minor bugs in cell style overrides and misnamed app attributes.
Diffstat (limited to 'test/workbook/worksheet/tc_col.rb')
| -rw-r--r-- | test/workbook/worksheet/tc_col.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/workbook/worksheet/tc_col.rb b/test/workbook/worksheet/tc_col.rb index b28e26e9..3eb033be 100644 --- a/test/workbook/worksheet/tc_col.rb +++ b/test/workbook/worksheet/tc_col.rb @@ -6,6 +6,13 @@ class TestCol < Test::Unit::TestCase @col = Axlsx::Col.new 1, 1 end + def test_initialize + options = { :width => 12, :collapsed => true, :hidden => true, :outlineLevel => 1, :phonetic => true, :style => 1} + + col = Axlsx::Col.new 0, 0, options + options.each{ |key, value| assert_equal(col.send(key.to_sym), value) } + end + def test_min_max_required assert_raise(ArgumentError, 'min and max must be specified when creating a new column') { Axlsx::Col.new } assert_raise(ArgumentError, 'min and max must be specified when creating a new column') { Axlsx::Col.new nil, nil } @@ -53,6 +60,8 @@ class TestCol < Test::Unit::TestCase def test_style assert_equal(@col.style, nil) + @col.style = 1 + assert_equal(@col.style, 1) #TODO check that the style specified is actually in the styles xfs collection end |
