summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorEvan Hallmark <[email protected]>2016-11-07 13:13:58 -0800
committerEvan Hallmark <[email protected]>2016-11-07 13:13:58 -0800
commitcbfabd0dca2eb4f1b3af81bbaa7433246c5b198d (patch)
tree4865723e76d23006489feeeec5b3f67db5d64490 /test
parent90b69543ccad773ffff581dd929d94502e45cae9 (diff)
downloadcaxlsx-cbfabd0dca2eb4f1b3af81bbaa7433246c5b198d.tar.gz
caxlsx-cbfabd0dca2eb4f1b3af81bbaa7433246c5b198d.zip
Added style_info field to pivot_table.rb
Diffstat (limited to 'test')
-rw-r--r--test/workbook/worksheet/tc_pivot_table.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/workbook/worksheet/tc_pivot_table.rb b/test/workbook/worksheet/tc_pivot_table.rb
index a62e6f40..08ad49e6 100644
--- a/test/workbook/worksheet/tc_pivot_table.rb
+++ b/test/workbook/worksheet/tc_pivot_table.rb
@@ -67,6 +67,18 @@ class TestPivotTable < Test::Unit::TestCase
assert_equal([{:ref=>"Sales", :subtotal => 'average'}], pivot_table.data)
end
+ def test_add_pivot_table_with_style_info
+ style_info_data = { :name=>"PivotStyleMedium9", :showRowHeaders=>"1", :showLastColumn=>"0"}
+ pivot_table = @ws.add_pivot_table('G5:G6', 'A1:E5', {:style_info=>style_info_data}) do |pt|
+ pt.rows = ['Year', 'Month']
+ pt.columns = ['Type']
+ pt.data = ['Sales']
+ pt.pages = ['Region']
+ end
+ assert_equal(style_info_data, pivot_table.style_info)
+ shared_test_pivot_table_xml_validity(pivot_table)
+ end
+
def test_add_pivot_table_with_row_without_subtotals
pivot_table = @ws.add_pivot_table('G5:G6', 'A1:D5', {:no_subtotals_on_headers=>['Year']}) do |pt|
pt.data = ['Sales']