Sha256: 8d0ef601af6ab8ced47538dd07835a3dbb3c756f0a5d5a4aa820e8676761bcc5
Contents?: true
Size: 705 Bytes
Versions: 3
Compression:
Stored size: 705 Bytes
Contents
require 'spec_helper' module CryptKeeper::LogSubscriber describe PostgresPgp do use_postgres subject { ::ActiveRecord::LogSubscriber.new } let(:input_query) do "SELECT pgp_sym_encrypt('encrypt_value', 'encrypt_key'), pgp_sym_decrypt('decrypt_value', 'decrypt_key') FROM DUAL;" end let(:output_query) do "SELECT pgp_sym_encrypt([FILTERED]), pgp_sym_decrypt([FILTERED]) FROM DUAL;" end it "filters pgp functions" do subject.should_receive(:sql_without_postgres_pgp) do |event| event.payload[:sql].should == output_query end subject.sql(ActiveSupport::Notifications::Event.new(:sql, 1, 1, 1, { sql: output_query })) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
crypt_keeper-0.7.0 | spec/log_subscriber/postgres_pgp_spec.rb |
crypt_keeper-0.6.1 | spec/log_subscriber/postgres_pgp_spec.rb |
crypt_keeper-0.6.0 | spec/log_subscriber/postgres_pgp_spec.rb |