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
path: root/spec/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-21 15:09:07 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-21 15:09:07 +0300
commit2a040e2655fe0a99df61ad0a7bd0c27e68af0c38 (patch)
treea245cd0d6dd10f185e2fd098e371adc1ea03b72b /spec/lib
parenta53d2c37c4934f564caa94543dd4cf5af1703e2d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/alerting/alert_spec.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/spec/lib/gitlab/alerting/alert_spec.rb b/spec/lib/gitlab/alerting/alert_spec.rb
index 90e93d189e2..790edbc9c60 100644
--- a/spec/lib/gitlab/alerting/alert_spec.rb
+++ b/spec/lib/gitlab/alerting/alert_spec.rb
@@ -17,6 +17,12 @@ describe Gitlab::Alerting::Alert do
end
end
+ shared_context 'full query' do
+ before do
+ payload['generatorURL'] = 'http://localhost:9090/graph?g0.expr=vector%281%29'
+ end
+ end
+
shared_examples 'invalid alert' do
it 'is invalid' do
expect(alert).not_to be_valid
@@ -180,10 +186,7 @@ describe Gitlab::Alerting::Alert do
context 'with gitlab alert' do
include_context 'gitlab alert'
-
- before do
- payload['generatorURL'] = 'http://localhost:9090/graph?g0.expr=vector%281%29'
- end
+ include_context 'full query'
it { is_expected.to eq(gitlab_alert.full_query) }
end