Sha256: 9aa354eddd2f0221082071ec0e4df8ab4f771e170442a57e678084cfa250f0cd
Contents?: true
Size: 1.07 KB
Versions: 27
Compression:
Stored size: 1.07 KB
Contents
require 'spec_helper' describe Mongo::Monitoring::Event::Secure do let(:document) do BSON::Document.new(test: 'value') end let(:klass) do Class.new do include Mongo::Monitoring::Event::Secure end end describe '#redacted' do let(:secure) do klass.new end context 'when the command must be redacted' do context 'when the command name is a string' do let(:redacted) do secure.redacted('saslStart', document) end it 'returns an empty document' do expect(redacted).to be_empty end end context 'when the command name is a symbol' do let(:redacted) do secure.redacted(:saslStart, document) end it 'returns an empty document' do expect(redacted).to be_empty end end end context 'when the command is not in the redacted list' do let(:redacted) do secure.redacted(:find, document) end it 'returns the document' do expect(redacted).to eq(document) end end end end
Version data entries
27 entries across 24 versions & 3 rubygems