summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_package_tar_writer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems/test_gem_package_tar_writer.rb')
-rw-r--r--test/rubygems/test_gem_package_tar_writer.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/rubygems/test_gem_package_tar_writer.rb b/test/rubygems/test_gem_package_tar_writer.rb
index f087df3..dac9a54 100644
--- a/test/rubygems/test_gem_package_tar_writer.rb
+++ b/test/rubygems/test_gem_package_tar_writer.rb
@@ -30,6 +30,16 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
assert_equal 1024, @io.pos
end
+ def test_add_symlink
+ Time.stub :now, Time.at(1458518157) do
+ @tar_writer.add_symlink 'x', 'y', 0644
+
+ assert_headers_equal(tar_symlink_header('x', '', 0644, Time.now, 'y'),
+ @io.string[0, 512])
+ end
+ assert_equal 512, @io.pos
+ end
+
def test_add_file_digest
digest_algorithms = Digest::SHA1, Digest::SHA512
@@ -251,4 +261,3 @@ class TestGemPackageTarWriter < Gem::Package::TarTestCase
end
end
-