summaryrefslogtreecommitdiffhomepage
path: root/test/stylesheet/tc_table_style_element.rb
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2012-05-15 11:23:59 +0900
committerRandy Morgan <[email protected]>2012-05-15 11:23:59 +0900
commit2d744ba77906d460b608859c945a5741ec725e42 (patch)
tree0366b619ea15909d230a2fa485a95d395486d6cf /test/stylesheet/tc_table_style_element.rb
parent2e1e14dd8f91e8a1416faae9501fdf04638104c7 (diff)
downloadcaxlsx-2d744ba77906d460b608859c945a5741ec725e42.tar.gz
caxlsx-2d744ba77906d460b608859c945a5741ec725e42.zip
bring coverage up to 100% and patch a few minor bugs in cell style overrides and misnamed app attributes.
Diffstat (limited to 'test/stylesheet/tc_table_style_element.rb')
-rw-r--r--test/stylesheet/tc_table_style_element.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/stylesheet/tc_table_style_element.rb b/test/stylesheet/tc_table_style_element.rb
index 2e6e763f..9ef54e2f 100644
--- a/test/stylesheet/tc_table_style_element.rb
+++ b/test/stylesheet/tc_table_style_element.rb
@@ -13,6 +13,10 @@ class TestTableStyleElement < Test::Unit::TestCase
assert_equal(@item.type, nil)
assert_equal(@item.size, nil)
assert_equal(@item.dxfId, nil)
+ options = { :type => :headerRow, :size => 10, :dxfId => 1 }
+
+ tse = Axlsx::TableStyleElement.new options
+ options.each { |key, value| assert_equal(tse.send(key.to_sym), value) }
end
def test_type
@@ -32,5 +36,10 @@ class TestTableStyleElement < Test::Unit::TestCase
assert_nothing_raised { @item.dxfId = 7 }
assert_equal(@item.dxfId, 7)
end
-
+
+ def test_to_xml_string
+ doc = Nokogiri::XML(@item.to_xml_string)
+ @item.type = :headerRow
+ assert(doc.xpath("//tableStyleElement[@type='#{@item.type.to_s}']"))
+ end
end