Sha256: 6969140e1fee3b8baf55023ec59ad173c044e70f63152e3dcdd37f0ff69c8629
Contents?: true
Size: 608 Bytes
Versions: 4
Compression:
Stored size: 608 Bytes
Contents
require 'spec_helper' RSpec.describe 'Crypto::Encryptor' do let(:options) { { value: '19999552059' } } describe 'encrypt working ok' do subject do Crypto::Encryptor.encrypt(options, 'secret') end it { expect { subject }.not_to raise_error } end describe 'decrypt working ok' do before do @encrypted_options = { value: Crypto::Encryptor.encrypt(options, 'secret') } end subject do Crypto::Encryptor.decrypt(@encrypted_options, 'secret') end it { expect { subject }.not_to raise_error } it { expect(subject).to eq options[:value] } end end
Version data entries
4 entries across 4 versions & 1 rubygems