Sha256: b671a5a55a8dc440acc72441b40c1885d9874121b5622520f0a84555cbb0306a
Contents?: true
Size: 1.07 KB
Versions: 19
Compression:
Stored size: 1.07 KB
Contents
# -*- coding: utf-8 -*- require 'helper' require 'write_xlsx/package/core' class TestCore01 < Minitest::Test def test_assemble_xml_file properties = { :author => 'A User', :created => Time.local(2010, 1, 1, 0, 0, 0) } @obj = Writexlsx::Package::Core.new @obj.set_properties(properties) @obj.assemble_xml_file result = got_to_array(@obj.xml_str) expected = expected_to_array(<<EOS <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <dc:creator>A User</dc:creator> <cp:lastModifiedBy>A User</cp:lastModifiedBy> <dcterms:created xsi:type="dcterms:W3CDTF">2010-01-01T00:00:00Z</dcterms:created> <dcterms:modified xsi:type="dcterms:W3CDTF">2010-01-01T00:00:00Z</dcterms:modified> </cp:coreProperties> EOS ) assert_equal(expected, result) end end
Version data entries
19 entries across 19 versions & 1 rubygems