Sha256: 03930e4e793abda0243fd40b9f6fedd872ddb3cc86166fe1726cef5170cf1139

Contents?: true

Size: 524 Bytes

Versions: 9

Compression:

Stored size: 524 Bytes

Contents

require 'test_helper'

class CryptTest < ActiveSupport::TestCase

  setup do
    @crypt = QuoVadis::Crypt
  end

  test 'round trip' do
    plaintext = 'the quick brown fox'
    ciphertext = @crypt.encrypt plaintext
    refute_equal plaintext, ciphertext
    assert_equal plaintext, @crypt.decrypt(ciphertext)
  end

  test 'same plaintext encrypts to different ciphertexts' do
    plaintext = 'the quick brown fox'
    ciphertext = @crypt.encrypt plaintext
    refute_equal ciphertext, @crypt.encrypt(plaintext)
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
quo_vadis-2.1.6 test/models/crypt_test.rb
quo_vadis-2.1.5 test/models/crypt_test.rb
quo_vadis-2.1.4 test/models/crypt_test.rb
quo_vadis-2.1.3 test/models/crypt_test.rb
quo_vadis-2.1.2 test/models/crypt_test.rb
quo_vadis-2.1.1 test/models/crypt_test.rb
quo_vadis-2.1.0 test/models/crypt_test.rb
quo_vadis-2.0.2 test/models/crypt_test.rb
quo_vadis-2.0.1 test/models/crypt_test.rb