summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2016-08-07 08:51:05 -0400
committerPaul Duncan <pabs@pablotron.org>2016-08-07 08:51:05 -0400
commitf35828b7f33e88565d1c2a86a9815718f94014cb (patch)
tree1ef3181d63f579394ae09070f7f2c4bf95ba134c /spec
parent02de1031ed14e738447090300fd490416059cf53 (diff)
downloadzip-crystal-f35828b7f33e88565d1c2a86a9815718f94014cb.tar.bz2
zip-crystal-f35828b7f33e88565d1c2a86a9815718f94014cb.zip
add none test
Diffstat (limited to 'spec')
-rw-r--r--spec/zip_spec.cr10
1 files changed, 10 insertions, 0 deletions
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")