summaryrefslogtreecommitdiff
path: root/spec/gitlab_net_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/gitlab_net_spec.rb')
-rw-r--r--spec/gitlab_net_spec.rb22
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