Welcome to mirror list, hosted at ThFree Co, Russian Federation.

count_job_trigger_worker_spec.rb « instance_statistics « analytics « workers « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c7de8553d86d25d260d21522ac4fa73423efab16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Analytics::InstanceStatistics::CountJobTriggerWorker do
  it_behaves_like 'an idempotent worker'

  context 'triggers a job for each measurement identifiers' do
    let(:expected_count) { Analytics::InstanceStatistics::Measurement.identifier_query_mapping.keys.size }

    it 'triggers CounterJobWorker jobs' do
      subject.perform

      expect(Analytics::InstanceStatistics::CounterJobWorker.jobs.count).to eq(expected_count)
    end
  end
end