Files
gitlab-foss/spec/lib/gitlab/usage/metric_definition_validate_all_spec.rb
2024-09-26 18:11:28 +00:00

15 lines
536 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Gitlab::Usage::MetricDefinition, feature_category: :product_analytics do
# rubocop:disable Rails/FindEach -- The all method invoked here is unrelated to the ActiveRecord scope all
it 'only has valid metric definitions', :aggregate_failures do
described_class.all.each do |definition|
validation_errors = definition.validation_errors
expect(validation_errors).to be_empty, validation_errors.join
end
end
# rubocop:enable Rails/FindEach
end