summaryrefslogtreecommitdiff
path: root/spec/models/project_services/prometheus_service_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/project_services/prometheus_service_spec.rb')
-rw-r--r--spec/models/project_services/prometheus_service_spec.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/models/project_services/prometheus_service_spec.rb b/spec/models/project_services/prometheus_service_spec.rb
index 1f9d3c07b51..71b53732164 100644
--- a/spec/models/project_services/prometheus_service_spec.rb
+++ b/spec/models/project_services/prometheus_service_spec.rb
@@ -14,13 +14,17 @@ describe PrometheusService, models: true, caching: true do
describe 'Validations' do
context 'when service is active' do
- before { subject.active = true }
+ before do
+ subject.active = true
+ end
it { is_expected.to validate_presence_of(:api_url) }
end
context 'when service is inactive' do
- before { subject.active = false }
+ before do
+ subject.active = false
+ end
it { is_expected.not_to validate_presence_of(:api_url) }
end