diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-27 12:08:32 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-27 12:08:32 +0300 |
commit | c8e28a0bb8dd45d91cb72ff2c930bc4a562f1fc7 (patch) | |
tree | a6b5d07b456c9494eb68ed210af74b58dc699a26 /spec/models | |
parent | eace733dca6e5c87315b42f42eb4d8f05934d6de (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/hooks/web_hook_log_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/models/hooks/web_hook_log_spec.rb b/spec/models/hooks/web_hook_log_spec.rb index 3520720d9a4..128601794cf 100644 --- a/spec/models/hooks/web_hook_log_spec.rb +++ b/spec/models/hooks/web_hook_log_spec.rb @@ -69,4 +69,20 @@ describe WebHookLog do it { expect(web_hook_log.success?).to be_falsey } end end + + describe '#internal_error?' do + let(:web_hook_log) { build_stubbed(:web_hook_log, response_status: status) } + + context 'when response status is not an internal error' do + let(:status) { '200' } + + it { expect(web_hook_log.internal_error?).to be_falsey } + end + + context 'when response status is an internal error' do + let(:status) { 'internal error' } + + it { expect(web_hook_log.internal_error?).to be_truthy } + end + end end |