Testing

On Dec 12, 2013, at 10:12 AM, Mike Boone <notifications@github.com> wrote:

> In spec/provider/postgres_pgp_public_key_spec.rb:
> 
> > +          specify { subject.encrypt(plain_text).should_not be_empty }
> > +        end
> > +
> > +        context "Integers" do
> > +          specify { subject.encrypt(integer_plain_text).should_not == integer_plain_text }
> > +          specify { subject.encrypt(integer_plain_text).should_not be_empty }
> > +        end
> > +      end
> > +
> > +      describe "#decrypt" do
> > +        specify { subject.decrypt(cipher_text).should == plain_text }
> > +        specify { subject.decrypt(integer_cipher_text).should == integer_plain_text.to_s }
> > +
> > +        it "does not decrypt w/o private key" do
> > +          pgp = PostgresPgpPublicKey.new key: ENCRYPTION_PASSWORD, public_key: public_key
> > +          pgp.decrypt(cipher_text).should be_nil
> Maybe that field becomes read-only if the object is persisted and the client does not have the private key? Or is that too strict?
> 
> —
> Reply to this email directly or view it on GitHub.
>