diff options
| author | Stefan <[email protected]> | 2021-03-27 01:15:54 +0100 |
|---|---|---|
| committer | Stefan <[email protected]> | 2021-03-27 01:15:54 +0100 |
| commit | 46c2ff10319cf068c15052ab2a320b974699e6e9 (patch) | |
| tree | 20182a0eae9c104c45e34e700afa04c3305fdd7e /test | |
| parent | 90bd6c37147312afca58b9862f109d06f6e29699 (diff) | |
| download | caxlsx-46c2ff10319cf068c15052ab2a320b974699e6e9.tar.gz caxlsx-46c2ff10319cf068c15052ab2a320b974699e6e9.zip | |
Fix test
The styles need to actually exist, otherwise the test fails with “ArgumentError: Invalid cellXfs id”.
Diffstat (limited to 'test')
| -rw-r--r-- | test/workbook/worksheet/tc_row.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/workbook/worksheet/tc_row.rb b/test/workbook/worksheet/tc_row.rb index e6dc3ef1..38b13806 100644 --- a/test/workbook/worksheet/tc_row.rb +++ b/test/workbook/worksheet/tc_row.rb @@ -149,7 +149,7 @@ class TestRow < Test::Unit::TestCase def test_offsets_with_styles offset = 3 values = [1,2,3,4,5] - styles = [6,7,8,9,10] + styles = (1..5).map{ @ws.workbook.styles.add_style } r = @ws.add_row(values, offset: offset, style: styles) r.cells.each_with_index do |c, index| assert_equal(c.style, index < offset ? 0 : styles[index-offset]) |
