diff options
author | Stan Hu <stanhu@gmail.com> | 2016-05-09 00:38:40 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-05-12 07:00:19 -0500 |
commit | b99bc5d422bced155ddb69b83858b5b3600f5bac (patch) | |
tree | 2722132eba1062d7753b6f6d264dee4d5c38bddc | |
parent | 7f7359b1381d376b81fd9b81120d8cfa0231a526 (diff) | |
download | gitlab-shell-b99bc5d422bced155ddb69b83858b5b3600f5bac.tar.gz |
Test password
-rw-r--r-- | spec/gitlab_net_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/gitlab_net_spec.rb b/spec/gitlab_net_spec.rb index 1312554..0643868 100644 --- a/spec/gitlab_net_spec.rb +++ b/spec/gitlab_net_spec.rb @@ -257,6 +257,20 @@ describe GitlabNet, vcr: true do end end + context "with password" do + it 'uses the specified host, port, and password' do + allow(gitlab_net).to receive(:config).and_return(config) + allow(config).to receive(:redis).and_return( { 'host' => 'localhost', 'port' => 1123, 'pass' => 'secret' } ) + + expect_any_instance_of(Redis).to receive(:initialize).with({ host: 'localhost', + port: 1123, + db: 0, + password: 'secret'}).and_call_original + gitlab_net.redis_client + end + end + + context "with redis socket" do let(:socket) { '/tmp/redis.socket' } |