diff options
| author | Weston Ganger <[email protected]> | 2022-10-21 10:53:57 -0700 |
|---|---|---|
| committer | Weston Ganger <[email protected]> | 2022-10-22 22:32:55 -0700 |
| commit | 56fae454a3a4f01c2401321579726d7331407f0d (patch) | |
| tree | a89b8a08fcecc02b0bea273936620b17365b858f /test/workbook | |
| parent | ebd11df1c11e3fe3eb0870e4c43d7ff8771ffe0d (diff) | |
| download | caxlsx-56fae454a3a4f01c2401321579726d7331407f0d.tar.gz caxlsx-56fae454a3a4f01c2401321579726d7331407f0d.zip | |
Fix bug in BorderCreator when second arg is nil
Diffstat (limited to 'test/workbook')
| -rw-r--r-- | test/workbook/worksheet/tc_border_creator.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/workbook/worksheet/tc_border_creator.rb b/test/workbook/worksheet/tc_border_creator.rb index 86b47fc1..c84b1f46 100644 --- a/test/workbook/worksheet/tc_border_creator.rb +++ b/test/workbook/worksheet/tc_border_creator.rb @@ -36,6 +36,16 @@ class TestBorderCreator < Test::Unit::TestCase assert_equal bc.instance_variable_get(:@edges), [:top] assert_equal bc.instance_variable_get(:@width), :thick assert_equal bc.instance_variable_get(:@color), "ffffff" + + bc = Axlsx::BorderCreator.new(@ws, @ws["A1:B2"], nil) + assert_equal bc.instance_variable_get(:@edges), Axlsx::Border::EDGES + assert_equal bc.instance_variable_get(:@width), :thin + assert_equal bc.instance_variable_get(:@color), "000000" + + bc = Axlsx::BorderCreator.new(@ws, @ws["A1:B2"]) + assert_equal bc.instance_variable_get(:@edges), Axlsx::Border::EDGES + assert_equal bc.instance_variable_get(:@width), :thin + assert_equal bc.instance_variable_get(:@color), "000000" end def test_draw |
