summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-12-07 20:17:29 +0100
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-12-07 20:17:29 +0100
commit949a7e8e2016621a42696fc6fc8dbe3235869e0a (patch)
tree47eefd78e957b638de5910b3f1e64ec9cce37701 /spec/models
parentc823e85d150e00201ed7db7dc0cce6142cbae7e1 (diff)
parentba3c702073f2f57eebbeabb2926fbd367aad87ea (diff)
downloadgitlab-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.rb6
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