summaryrefslogtreecommitdiffhomepage
path: root/test/workbook/worksheet/tc_pane.rb
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2012-06-07 08:58:01 +0900
committerRandy Morgan <[email protected]>2012-06-07 08:58:01 +0900
commit713bd69c8bce9094602fcd731d5e4cce9916b6c6 (patch)
tree0add1086c76cccee42f5e223a6b51e0eb7c00571 /test/workbook/worksheet/tc_pane.rb
parent993d1b7d05f969bdaa44cd859f71c4783c2a733b (diff)
downloadcaxlsx-713bd69c8bce9094602fcd731d5e4cce9916b6c6.tar.gz
caxlsx-713bd69c8bce9094602fcd731d5e4cce9916b6c6.zip
patch unit tests for sheet view and pane serialization.
Diffstat (limited to 'test/workbook/worksheet/tc_pane.rb')
-rw-r--r--test/workbook/worksheet/tc_pane.rb23
1 files changed, 3 insertions, 20 deletions
diff --git a/test/workbook/worksheet/tc_pane.rb b/test/workbook/worksheet/tc_pane.rb
index 7cc06b49..e2bd1519 100644
--- a/test/workbook/worksheet/tc_pane.rb
+++ b/test/workbook/worksheet/tc_pane.rb
@@ -82,24 +82,7 @@ class TestPane < Test::Unit::TestCase
end
def test_to_xml
- p = Axlsx::Package.new
- @ws = p.workbook.add_worksheet :name => "sheetview"
- @ws.sheet_view do |vs|
- vs.pane do |p|
- p.active_pane = :top_left
- p.state = :frozen_split
- p.x_split = 255
- p.y_split = 563
- p.top_left_cell = 'B5'
- end
- end
-
- doc = Nokogiri::XML.parse(@ws.to_xml_string)
-
- assert_equal(1, doc.xpath("//xmlns:worksheet/xmlns:sheetViews/xmlns:sheetView/xmlns:pane[@ySplit='563']
- [@xSplit='255'][@topLeftCell='B5'][@state='frozenSplit'][@activePane='topLeftCell']").size)
-
- assert doc.xpath( "//xmlns:worksheet/xmlns:sheetViews/xmlns:sheetView/xmlns:pane[@ySplit='563']
- [@xSplit='255'][@topLeftCell='B5'][@state='frozenSplit'][@activePane='topLeftCell']")
+ doc = Nokogiri::XML.parse(@pane.to_xml_string)
+ assert_equal(1, doc.xpath("//pane[@ySplit=2][@xSplit='2'][@topLeftCell='A2'][@state='frozen'][@activePane='bottomLeft']").size)
end
-end \ No newline at end of file
+end