diff options
Diffstat (limited to 'spec/lib/gitlab/utils_spec.rb')
-rw-r--r-- | spec/lib/gitlab/utils_spec.rb | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/spec/lib/gitlab/utils_spec.rb b/spec/lib/gitlab/utils_spec.rb index a68434c8c66..890918d4a7c 100644 --- a/spec/lib/gitlab/utils_spec.rb +++ b/spec/lib/gitlab/utils_spec.rb @@ -252,41 +252,4 @@ describe Gitlab::Utils do expect(described_class.string_to_ip_object('1:0:0:0:0:0:0:0/124')).to eq(IPAddr.new('1:0:0:0:0:0:0:0/124')) end end - - describe '.allow_hash_values' do - it 'removes keys that do not pass the inclusion filters' do - symbols = %i[x y z] - ints = (0..100) - strings = %w[foo bar baz].to_set - - hash = { - a: :x, - b: 100, - c: 'foo', - d: :irrelevant, - aa: :w, - bb: 200, - cc: 'food', - dd: :totally_irrelevant - } - allowed = { - a: symbols, - b: ints, - c: strings, - aa: symbols, - bb: ints, - cc: strings - } - - described_class.allow_hash_values(hash, allowed) - - expect(hash).to eq({ - a: :x, - b: 100, - c: 'foo', - d: :irrelevant, - dd: :totally_irrelevant - }) - end - end end |