summaryrefslogtreecommitdiffhomepage
path: root/test/tc_package.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/tc_package.rb')
-rw-r--r--test/tc_package.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/tc_package.rb b/test/tc_package.rb
index df096a31..86f11dd4 100644
--- a/test/tc_package.rb
+++ b/test/tc_package.rb
@@ -123,6 +123,16 @@ class TestPackage < Test::Unit::TestCase
end
end
end
+
+ # See comment for Package#zip_entry_for_part
+ def test_serialization_creates_identical_files_at_any_time_if_created_at_is_set
+ @package.core.created = Time.now
+ zip_content_now = @package.to_stream.string
+ Timecop.travel(3600) do
+ zip_content_then = @package.to_stream.string
+ assert zip_content_then == zip_content_now, "zip files are not identical"
+ end
+ end
def test_validation
assert_equal(@package.validate.size, 0, @package.validate)