diff options
author | Gabriel Mazetto <brodock@gmail.com> | 2016-08-19 20:26:19 +0200 |
---|---|---|
committer | Gabriel Mazetto <brodock@gmail.com> | 2016-08-19 20:26:19 +0200 |
commit | ee684a0973b2f5fbb30fcf2f1b3099564ca15ac9 (patch) | |
tree | b90e1df74cc8c53c891f06912e65575fd0f2be48 | |
parent | ed9dc1235699bbb5534c2207a733db9e51f32d6b (diff) | |
download | gitlab-shell-ee684a0973b2f5fbb30fcf2f1b3099564ca15ac9.tar.gz |
Remove useless `.and_call_origin` from specsfeature/redis-sentinel
-rw-r--r-- | spec/gitlab_net_spec.rb | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/spec/gitlab_net_spec.rb b/spec/gitlab_net_spec.rb index 2cb97cb..d4585d2 100644 --- a/spec/gitlab_net_spec.rb +++ b/spec/gitlab_net_spec.rb @@ -276,19 +276,7 @@ describe GitlabNet, vcr: true do expect_any_instance_of(Redis).to receive(:initialize).with({ host: '127.0.0.1', port: 6379, - db: 0 }).and_call_original - gitlab_net.redis_client - end - end - - context "with host and port" do - it 'uses the specified host and port' do - allow(gitlab_net).to receive(:config).and_return(config) - allow(config).to receive(:redis).and_return( { 'host' => 'localhost', 'port' => 1123 } ) - - expect_any_instance_of(Redis).to receive(:initialize).with({ host: 'localhost', - port: 1123, - db: 0 }).and_call_original + db: 0 }) gitlab_net.redis_client end end @@ -301,13 +289,13 @@ describe GitlabNet, vcr: true do expect_any_instance_of(Redis).to receive(:initialize).with({ host: 'localhost', port: 1123, db: 0, - password: 'secret'}).and_call_original + password: 'secret'}) gitlab_net.redis_client end end context "with sentinels" do - it 'users the specified sentinels' do + it 'uses the specified sentinels' do allow(gitlab_net).to receive(:config).and_return(config) allow(config).to receive(:redis).and_return({ 'host' => 'localhost', 'port' => 1123, 'sentinels' => [{'host' => '127.0.0.1', 'port' => 26380}] }) @@ -315,7 +303,7 @@ describe GitlabNet, vcr: true do expect_any_instance_of(Redis).to receive(:initialize).with({ host: 'localhost', port: 1123, db: 0, - sentinels: [{host: '127.0.0.1', port: 26380}] }).and_call_original + sentinels: [{host: '127.0.0.1', port: 26380}] }) gitlab_net.redis_client end end @@ -328,7 +316,7 @@ describe GitlabNet, vcr: true do allow(gitlab_net).to receive(:config).and_return(config) allow(config).to receive(:redis).and_return( { 'socket' => socket }) - expect_any_instance_of(Redis).to receive(:initialize).with({ path: socket, db: 0 }).and_call_original + expect_any_instance_of(Redis).to receive(:initialize).with({ path: socket, db: 0 }) gitlab_net.redis_client end end |