Sha256: e7fab3c9854b6ca763a297d893b1ccb42b9c9a52d08d40530c1d7dde6429144d

Contents?: true

Size: 524 Bytes

Versions: 1

Compression:

Stored size: 524 Bytes

Contents

require 'tc_helper.rb'

class TestStrData < Test::Unit::TestCase

  def setup
    @str_data = Axlsx::StrData.new :data => ["1", "2", "3"]
  end

  def test_to_xml_string_strLit
    str = '<?xml version="1.0" encoding="UTF-8"?>'
    str << '<c:chartSpace xmlns:c="' << Axlsx::XML_NS_C << '">'
    str << @str_data.to_xml_string
    doc = Nokogiri::XML(str)
    assert_equal(doc.xpath("//c:strLit/c:ptCount[@val=3]").size, 1)
    assert_equal(doc.xpath("//c:strLit/c:pt/c:v[text()='1']").size, 1)
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
caxlsx-3.2.0 test/drawing/tc_str_data.rb