diff options
Diffstat (limited to 'spec/models/integrations/prometheus_spec.rb')
-rw-r--r-- | spec/models/integrations/prometheus_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/models/integrations/prometheus_spec.rb b/spec/models/integrations/prometheus_spec.rb index a7495cb9574..fbeaebfd807 100644 --- a/spec/models/integrations/prometheus_spec.rb +++ b/spec/models/integrations/prometheus_spec.rb @@ -145,6 +145,17 @@ RSpec.describe Integrations::Prometheus, :use_clean_rails_memory_store_caching, expect(req_stub).to have_been_requested end end + + context 'when configuration is not valid' do + before do + integration.api_url = nil + end + + it 'returns failure message' do + expect(integration.test[:success]).to be_falsy + expect(integration.test[:result]).to eq('Prometheus configuration error') + end + end end describe '#prometheus_client' do |