summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorStefan <[email protected]>2021-03-27 01:15:54 +0100
committerStefan <[email protected]>2021-03-27 01:15:54 +0100
commit46c2ff10319cf068c15052ab2a320b974699e6e9 (patch)
tree20182a0eae9c104c45e34e700afa04c3305fdd7e /test
parent90bd6c37147312afca58b9862f109d06f6e29699 (diff)
downloadcaxlsx-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.rb2
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])