diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-01 00:06:28 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-01 00:06:28 +0300 |
commit | 8f210aebe1d740e8ee194f171f1f33a6e1fba313 (patch) | |
tree | f43c545801bb96fd0737f18493fb30ab92972627 /spec/lib/gitlab/utils_spec.rb | |
parent | 996f700997805b3590da8d8afdd19d193989078a (diff) |
Add latest changes from gitlab-org/gitlab@master
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 |