diff options
Diffstat (limited to 'spec/lib/gitlab/cache/import/caching_spec.rb')
-rw-r--r-- | spec/lib/gitlab/cache/import/caching_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/lib/gitlab/cache/import/caching_spec.rb b/spec/lib/gitlab/cache/import/caching_spec.rb index d6911dad9d4..8ce12f5d32e 100644 --- a/spec/lib/gitlab/cache/import/caching_spec.rb +++ b/spec/lib/gitlab/cache/import/caching_spec.rb @@ -88,6 +88,18 @@ RSpec.describe Gitlab::Cache::Import::Caching, :clean_gitlab_redis_cache do end end + describe '.values_from_set' do + it 'returns empty list when the set is empty' do + expect(described_class.values_from_set('foo')).to eq([]) + end + + it 'returns the set list of values' do + described_class.set_add('foo', 10) + + expect(described_class.values_from_set('foo')).to eq(['10']) + end + end + describe '.write_multiple' do it 'sets multiple keys when key_prefix not set' do mapping = { 'foo' => 10, 'bar' => 20 } |