Sha256: 8193b3c75f0c1c178285f4949dca6766905d90eb08740d69e0157fe6193fdad7
Contents?: true
Size: 696 Bytes
Versions: 4
Compression:
Stored size: 696 Bytes
Contents
require 'spec_helper' module CryptKeeperProviders describe MysqlAesLogSubscriber do use_postgres subject { ::ActiveRecord::LogSubscriber.new } let(:input_query) do "SELECT AES_ENCRYPT('encrypt_value', 'encrypt_key'), AES_ENCRYPT('decrypt_value', 'decrypt_key') FROM DUAL;" end let(:output_query) do "SELECT AES_ENCRYPT([FILTERED]), AES_DECRYPT([FILTERED]) FROM DUAL;" end it "filters mysql aes functions" do subject.should_receive(:sql_without_mysql_aes) 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
4 entries across 4 versions & 2 rubygems