diff options
| author | Randy Morgan <[email protected]> | 2012-05-03 09:10:23 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-05-03 09:10:23 +0900 |
| commit | e622dc54069074198990beb0462da630bad38dd0 (patch) | |
| tree | 4065eb11cf4dcd68440bf8347af4509c130fb11e /test/drawing/tc_str_val.rb | |
| parent | 2dfdd1f26b1fc748da3b4edad9aeeaeae842aedb (diff) | |
| download | caxlsx-e622dc54069074198990beb0462da630bad38dd0.tar.gz caxlsx-e622dc54069074198990beb0462da630bad38dd0.zip | |
rebuild series data base objects with full implementation.
Address shape validation error.
Diffstat (limited to 'test/drawing/tc_str_val.rb')
| -rw-r--r-- | test/drawing/tc_str_val.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/drawing/tc_str_val.rb b/test/drawing/tc_str_val.rb new file mode 100644 index 00000000..0e4ca835 --- /dev/null +++ b/test/drawing/tc_str_val.rb @@ -0,0 +1,21 @@ +require 'tc_helper.rb' + +class TestStrVal < Test::Unit::TestCase + + def setup + @str_val = Axlsx::StrVal.new :v => "1" + end + + def test_initialize + assert_equal(@str_val.v, "1") + end + + def test_to_xml_string + str = '<?xml version="1.0" encoding="UTF-8"?>' + str << '<c:chartSpace xmlns:c="' << Axlsx::XML_NS_C << '">' + str << @str_val.to_xml_string(0) + doc = Nokogiri::XML(str) + assert_equal(doc.xpath("//c:pt/c:v[text()='1']").size, 1) + end + +end |
