From f35828b7f33e88565d1c2a86a9815718f94014cb Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sun, 7 Aug 2016 08:51:05 -0400 Subject: add none test --- spec/zip_spec.cr | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'spec') diff --git a/spec/zip_spec.cr b/spec/zip_spec.cr index d132c1c..83d0dcc 100644 --- a/spec/zip_spec.cr +++ b/spec/zip_spec.cr @@ -24,6 +24,16 @@ describe Zip::Writer do end end + it "creates an entry from a String with no compression" do + Zip.write(File.join(TEST_DIR, "test-string-none.zip")) do |zip| + zip.add( + path: "bar.txt", + data: "bar", + method: Zip::CompressionMethod::NONE + ) + end + end + it "creates an entry from a MemoryIO" do Zip.write(File.join(TEST_DIR, "test-memio.zip")) do |zip| zip.add("bar.txt", "bar") -- cgit v1.2.3