diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 11:18:50 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 11:18:50 +0000 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /spec/models/performance_monitoring/prometheus_panel_group_spec.rb | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) | |
download | gitlab-ce-8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781.tar.gz |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'spec/models/performance_monitoring/prometheus_panel_group_spec.rb')
-rw-r--r-- | spec/models/performance_monitoring/prometheus_panel_group_spec.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/models/performance_monitoring/prometheus_panel_group_spec.rb b/spec/models/performance_monitoring/prometheus_panel_group_spec.rb index 2447bb5df94..ecf7e13a9a3 100644 --- a/spec/models/performance_monitoring/prometheus_panel_group_spec.rb +++ b/spec/models/performance_monitoring/prometheus_panel_group_spec.rb @@ -30,9 +30,17 @@ describe PerformanceMonitoring::PrometheusPanelGroup do end describe 'validations' do + context 'json_content is not a hash' do + let(:json_content) { nil } + + subject { described_class.from_json(json_content) } + + it { expect { subject }.to raise_error(ActiveModel::ValidationError) } + end + context 'when group is missing' do before do - json_content['group'] = nil + json_content.delete('group') end subject { described_class.from_json(json_content) } |