summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/usage/metrics/instrumentations/count_ml_candidates_metric_spec.rb
blob: 7d7788737df030d3db5bd35429c1d29ba1b27b50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Gitlab::Usage::Metrics::Instrumentations::CountMlCandidatesMetric, feature_category: :mlops do
  let_it_be(:candidate) { create(:ml_candidates) }

  let(:expected_value) { 1 }
  let(:expected_query) { 'SELECT COUNT("ml_candidates"."id") FROM "ml_candidates"' }

  it_behaves_like 'a correct instrumented metric value and query', { time_frame: 'all' }
end