diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-08 21:13:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-08 21:13:02 +0300 |
commit | e7527f548681e4f9efd32f9c3da937ad74c68948 (patch) | |
tree | ef51227ccbbeb1accc8e3886870dbc6a168e8bb8 /spec/support/redis | |
parent | f2ac9ee99ac6b1afc0edbc8621a05176dddd6a14 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/redis')
-rw-r--r-- | spec/support/redis/redis_shared_examples.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/support/redis/redis_shared_examples.rb b/spec/support/redis/redis_shared_examples.rb index 09bb3363205..dd916aea3e8 100644 --- a/spec/support/redis/redis_shared_examples.rb +++ b/spec/support/redis/redis_shared_examples.rb @@ -255,6 +255,28 @@ RSpec.shared_examples "redis_shared_examples" do end end + describe '#db' do + let(:rails_env) { 'development' } + + subject { described_class.new(rails_env).db } + + context 'with old format' do + let(:config_file_name) { config_old_format_host } + + it 'returns the correct db' do + expect(subject).to eq(redis_database) + end + end + + context 'with new format' do + let(:config_file_name) { config_new_format_host } + + it 'returns the correct db' do + expect(subject).to eq(redis_database) + end + end + end + describe '#sentinels' do subject { described_class.new(rails_env).sentinels } |