summaryrefslogtreecommitdiffhomepage
path: root/test/stylesheet/tc_gradient_fill.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/stylesheet/tc_gradient_fill.rb')
-rw-r--r--test/stylesheet/tc_gradient_fill.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/stylesheet/tc_gradient_fill.rb b/test/stylesheet/tc_gradient_fill.rb
index c252a498..546941d7 100644
--- a/test/stylesheet/tc_gradient_fill.rb
+++ b/test/stylesheet/tc_gradient_fill.rb
@@ -61,4 +61,12 @@ class TestGradientFill < Test::Unit::TestCase
assert(@item.stop.size == 1)
assert(@item.stop.last.is_a?(Axlsx::GradientStop))
end
+
+ def test_to_xml_string
+ @item.stop << Axlsx::GradientStop.new(Axlsx::Color.new(:rgb => "000000"), 0.5)
+ @item.stop << Axlsx::GradientStop.new(Axlsx::Color.new(:rgb => "FFFFFF"), 0.5)
+ @item.type = :path
+ doc = Nokogiri::XML(@item.to_xml_string)
+ assert(doc.xpath("//color[@rgb='FF000000']"))
+ end
end