diff options
| author | randym <[email protected]> | 2018-02-06 20:39:41 +0900 |
|---|---|---|
| committer | randym <[email protected]> | 2018-02-06 20:39:41 +0900 |
| commit | a981ae5afffb6b0dfe411820e3df1a44f5cbd63f (patch) | |
| tree | 78e54619d650326f022867e21f06d5bc95603ff5 /test | |
| parent | 64038e6af1db608daae2aad49874071070285eac (diff) | |
| parent | 5063753d373abe475dd7b170cb2e6d4420ed8ee9 (diff) | |
| download | caxlsx-a981ae5afffb6b0dfe411820e3df1a44f5cbd63f.tar.gz caxlsx-a981ae5afffb6b0dfe411820e3df1a44f5cbd63f.zip | |
Merge branch 'master' into release-3.0.0
Diffstat (limited to 'test')
| -rw-r--r-- | test/tc_helper.rb | 4 | ||||
| -rw-r--r-- | test/tc_package.rb | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/test/tc_helper.rb b/test/tc_helper.rb index 96f545cd..396f19b2 100644 --- a/test/tc_helper.rb +++ b/test/tc_helper.rb @@ -7,4 +7,6 @@ end require 'test/unit' require "timecop" -require "axlsx.rb"
\ No newline at end of file +require "axlsx.rb" +# MIME detection for Microsoft Office 2007+ formats +require 'mimemagic/overlay' diff --git a/test/tc_package.rb b/test/tc_package.rb index 0ad27f7d..58ff53b0 100644 --- a/test/tc_package.rb +++ b/test/tc_package.rb @@ -154,6 +154,11 @@ class TestPackage < Test::Unit::TestCase assert package_1.to_stream.string == package_2.to_stream.string, "zip files are not identical" end + def test_serialization_creates_files_with_excel_mime_type + assert_equal(MimeMagic.by_magic(@package.to_stream).type, + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') + end + def test_validation assert_equal(@package.validate.size, 0, @package.validate) Axlsx::Workbook.send(:class_variable_set, :@@date1904, 9900) |
