diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-21 15:09:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-21 15:09:07 +0300 |
commit | 2a040e2655fe0a99df61ad0a7bd0c27e68af0c38 (patch) | |
tree | a245cd0d6dd10f185e2fd098e371adc1ea03b72b /spec/lib | |
parent | a53d2c37c4934f564caa94543dd4cf5af1703e2d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/alerting/alert_spec.rb | 11 |
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 |