diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-12-07 20:17:29 +0100 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-12-07 20:17:29 +0100 |
commit | 949a7e8e2016621a42696fc6fc8dbe3235869e0a (patch) | |
tree | 47eefd78e957b638de5910b3f1e64ec9cce37701 /spec/models | |
parent | c823e85d150e00201ed7db7dc0cce6142cbae7e1 (diff) | |
parent | ba3c702073f2f57eebbeabb2926fbd367aad87ea (diff) | |
download | gitlab-ce-949a7e8e2016621a42696fc6fc8dbe3235869e0a.tar.gz |
Merge branch 'report-ssl-errors' of https://gitlab.com/stanhu/gitlab-ce
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/hooks/web_hook_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/models/hooks/web_hook_spec.rb b/spec/models/hooks/web_hook_spec.rb index 2fdc49f02ee..35042788c65 100644 --- a/spec/models/hooks/web_hook_spec.rb +++ b/spec/models/hooks/web_hook_spec.rb @@ -71,5 +71,11 @@ describe ProjectHook do expect { @project_hook.execute(@data, 'push_hooks') }.to raise_error(RuntimeError) end + + it "handles SSL exceptions" do + expect(WebHook).to receive(:post).and_raise(OpenSSL::SSL::SSLError.new('SSL error')) + + expect(@project_hook.execute(@data, 'push_hooks')).to eq([false, 'SSL error']) + end end end |