Sha256: e181535cd730600f99a2c99cb142124eb575e65577ae39f9b6061c6218237e45
Contents?: true
Size: 598 Bytes
Versions: 5
Compression:
Stored size: 598 Bytes
Contents
describe Dap::Filter::FilterFlatten do describe '.process' do let(:filter) { described_class.new(["foo"]) } context 'flatten nested json' do let(:process) { filter.process({"foo" => {"bar" => "baz"}}) } it 'has new flattened nested document keys' do expect(process).to eq([{"foo" => {"bar" => "baz"}, "foo.bar" => "baz"}]) end end context 'ignore unnested keys' do let(:process) { filter.process({"foo" => "bar"}) } it 'is the same as the original document' do expect(process).to eq([{"foo" => "bar"}]) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems