Sha256: 0ceff42f7f54a120a797282c8ade8bcfeb5ec28eaf2fa427ea0321821687470e
Contents?: true
Size: 977 Bytes
Versions: 4
Compression:
Stored size: 977 Bytes
Contents
# frozen_string_literal: true require 'rspectacular' require 'chamber/filters/translate_secure_keys_filter' module Chamber module Filters describe TranslateSecureKeysFilter do it 'will translate keys if they start with "_secure_"' do filtered_settings = TranslateSecureKeysFilter.execute( data: { _secure_my_secure_setting: 'hello', }, ) expect(filtered_settings.my_secure_setting).to eql 'hello' end it 'will not translate keys if they do not start with "_secure_"' do filtered_settings = TranslateSecureKeysFilter.execute( data: { my_secure_setting: 'hello', }, ) expect(filtered_settings.my_secure_setting).to eql 'hello' end it 'will not translate the key if it starts with "secure"' do filtered_settings = TranslateSecureKeysFilter.execute( data: { secure_setting: 'hello', }, ) expect(filtered_settings.secure_setting).to eql 'hello' end end end end
Version data entries
4 entries across 4 versions & 1 rubygems