Class: NullDecrypterTest

Inherits:
MiniTest::Test
  • Object
show all
Defined in:
lib/hotplate/gems/rubyzip-1.1.7/test/crypto/null_encryption_test.rb

Instance Method Summary collapse

Instance Method Details

#setupObject



32
33
34
# File 'lib/hotplate/gems/rubyzip-1.1.7/test/crypto/null_encryption_test.rb', line 32

def setup
  @decrypter = ::Zip::NullDecrypter.new
end

#test_decryptObject



44
45
46
47
48
# File 'lib/hotplate/gems/rubyzip-1.1.7/test/crypto/null_encryption_test.rb', line 44

def test_decrypt
  [nil, '', 'a' * 10, 0xffffffff].each do |data|
    assert_equal data, @decrypter.decrypt(data)
  end
end

#test_gp_flagsObject



40
41
42
# File 'lib/hotplate/gems/rubyzip-1.1.7/test/crypto/null_encryption_test.rb', line 40

def test_gp_flags
  assert_equal 0, @decrypter.gp_flags
end

#test_header_bytesizeObject



36
37
38
# File 'lib/hotplate/gems/rubyzip-1.1.7/test/crypto/null_encryption_test.rb', line 36

def test_header_bytesize
  assert_equal 0, @decrypter.header_bytesize
end

#test_reset!Object



50
51
52
# File 'lib/hotplate/gems/rubyzip-1.1.7/test/crypto/null_encryption_test.rb', line 50

def test_reset!
  assert_respond_to @decrypter, :reset!
end