test/drawing/tc_axis.rb in axlsx-1.1.7 vs test/drawing/tc_axis.rb in axlsx-1.1.8

- old
+ new

@@ -17,9 +17,17 @@ assert(@axis.scaling.is_a?(Axlsx::Scaling) && @axis.scaling.orientation == :minMax, "scaling default incorrect") assert_raise(ArgumentError) { Axlsx::Axis.new( -1234, 'abcd') } assert_equal('Foo', @axis.title.text) end + def test_color + @axis.color = "00FF00" + str = '<?xml version="1.0" encoding="UTF-8"?>' + str << '<c:chartSpace xmlns:c="' << Axlsx::XML_NS_C << '" xmlns:a="' << Axlsx::XML_NS_A << '">' + doc = Nokogiri::XML(@axis.to_xml_string(str)) + assert(doc.xpath("//a:srgbClr[@val='00FF00']")) + end + def test_cell_based_axis_title p = Axlsx::Package.new p.workbook.add_worksheet(:name=>'foosheet') do |sheet| sheet.add_row ['battle victories'] sheet.add_row ['bird', 1, 2, 1]