Class: NullEncrypterTest

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



4
5
6
# File 'lib/hotplate/gems/rubyzip-1.1.7/test/crypto/null_encryption_test.rb', line 4

def setup
  @encrypter = ::Zip::NullEncrypter.new
end

#test_encryptObject



20
21
22
23
24
# File 'lib/hotplate/gems/rubyzip-1.1.7/test/crypto/null_encryption_test.rb', line 20

def test_encrypt
  [nil, '', 'a' * 10, 0xffffffff].each do |data|
    assert_equal data, @encrypter.encrypt(data)
  end
end

#test_gp_flagsObject



12
13
14
# File 'lib/hotplate/gems/rubyzip-1.1.7/test/crypto/null_encryption_test.rb', line 12

def test_gp_flags
  assert_equal 0, @encrypter.gp_flags
end

#test_headerObject



16
17
18
# File 'lib/hotplate/gems/rubyzip-1.1.7/test/crypto/null_encryption_test.rb', line 16

def test_header
  assert_empty @encrypter.header(nil)
end

#test_header_bytesizeObject



8
9
10
# File 'lib/hotplate/gems/rubyzip-1.1.7/test/crypto/null_encryption_test.rb', line 8

def test_header_bytesize
  assert_equal 0, @encrypter.header_bytesize
end

#test_reset!Object



26
27
28
# File 'lib/hotplate/gems/rubyzip-1.1.7/test/crypto/null_encryption_test.rb', line 26

def test_reset!
  assert_respond_to @encrypter, :reset!
end