Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-27 12:08:32 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-27 12:08:32 +0300
commitc8e28a0bb8dd45d91cb72ff2c930bc4a562f1fc7 (patch)
treea6b5d07b456c9494eb68ed210af74b58dc699a26 /spec/models/hooks
parenteace733dca6e5c87315b42f42eb4d8f05934d6de (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/hooks')
-rw-r--r--spec/models/hooks/web_hook_log_spec.rb16
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