summaryrefslogtreecommitdiffhomepage
path: root/test/workbook
diff options
context:
space:
mode:
authorGeremia Taglialatela <[email protected]>2023-06-05 16:49:23 +0200
committerGeremia Taglialatela <[email protected]>2023-06-05 17:27:41 +0200
commit0cc60e3eb08e11542612871e2e15350ed07fff06 (patch)
treeae63495552175e26ab6be3aefe190a7e5ab657a9 /test/workbook
parent7fdbd745a2c914001a2174aeadae26b9c970ffaf (diff)
downloadcaxlsx-0cc60e3eb08e11542612871e2e15350ed07fff06.tar.gz
caxlsx-0cc60e3eb08e11542612871e2e15350ed07fff06.zip
Fix Style/RedundantInterpolation offenses
`%` is an operation on `String` that will return a new `String`, so the interpolation is redundant Also adds a missing spec on PivotTable#rels_pn ``` IPS: uninterpolated: 4045715.7 i/s interpolated: 2359775.6 i/s - 1.71x (± 0.00) slower Memory: uninterpolated: 160 allocated interpolated: 232 allocated - 1.45x more ```
Diffstat (limited to 'test/workbook')
-rw-r--r--test/workbook/worksheet/tc_pivot_table.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/workbook/worksheet/tc_pivot_table.rb b/test/workbook/worksheet/tc_pivot_table.rb
index 606982db..d4db9cef 100644
--- a/test/workbook/worksheet/tc_pivot_table.rb
+++ b/test/workbook/worksheet/tc_pivot_table.rb
@@ -144,6 +144,12 @@ class TestPivotTable < Test::Unit::TestCase
assert_equal(2, @ws.relationships.size, "adding a pivot table adds a relationship")
end
+ def test_rels_pn
+ @ws.add_pivot_table('G5:G6', 'A1:D5')
+
+ assert_equal("pivotTables/_rels/pivotTable1.xml.rels", @ws.pivot_tables.first.rels_pn)
+ end
+
def test_to_xml_string
pivot_table = @ws.add_pivot_table('G5:G6', 'A1:E5', { no_subtotals_on_headers: ['Year'] }) do |pt|
pt.rows = ['Year', 'Month']