Sha256: 94b189d0e6bfef15574d522bf12993a9406475e1a69f8b14e7799176158c4527
Contents?: true
Size: 409 Bytes
Versions: 1
Compression:
Stored size: 409 Bytes
Contents
require 'spec_helper' describe Parsel do let(:key) { 'my secret key' } it 'encrypts data' do expect(Parsel.encrypt(key, 'hello')).not_to eq('hello') end it 'decrypts data' do encrypted = Parsel.encrypt(key, 'hello') expect(Parsel.decrypt(key, encrypted)).to eq('hello') end it 'returns false when decryption fails' do expect(Parsel.decrypt('abc', '123')).to be_falsy end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
parsel-0.2.0 | spec/parsel_spec.rb |