Sha256: d181b66350f7e94f74916285ebc00165d5d8f1c0ff75b6508542a90e6a49d6af
Contents?: true
Size: 724 Bytes
Versions: 3
Compression:
Stored size: 724 Bytes
Contents
# -*- encoding: utf-8 -*- require 'spec_helper' describe 'Asymmetric encryption' do let(:credential) { AsymmetricCredential.create(:email => 'john.smith@example.com', :password => 'this is a secret') } context "#to_s" do subject { "#{credential.password}" } it { should_not eq('this is a secret') } end context "'this is a secret'" do subject { credential.password } it { should be_encrypted } it { should eq('this is a secret') } end context "attribute length" do subject { credential.password.length } it { should eq(175) } end context "cipher" do subject { credential.password.cipher } it { should be_an_instance_of(EncryptedStrings::AsymmetricCipher) } end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
mongoid-encryptor-0.0.5 | spec/asymmetric_encryption_spec.rb |
mongoid-encryptor-0.0.4 | spec/asymmetric_encryption_spec.rb |
mongoid-encryptor-0.0.1 | spec/asymmetric_encryption_spec.rb |