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

progress_worker_spec.rb « onboarding « workers « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1eb44c57769f43498c55ad05360e74159cd74014 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Onboarding::ProgressWorker, '#perform', feature_category: :onboarding do
  let_it_be(:namespace) { create(:namespace) }
  let_it_be(:action) { 'git_pull' }

  it_behaves_like 'records an onboarding progress action', :git_pull do
    subject { described_class.new.perform(namespace.id, action) }
  end

  it_behaves_like 'an idempotent worker' do
    let(:job_args) { [namespace.id, action] }
  end

  it_behaves_like 'does not record an onboarding progress action' do
    subject { described_class.new.perform(namespace.id, nil) }
  end

  it_behaves_like 'does not record an onboarding progress action' do
    subject { described_class.new.perform(nil, action) }
  end
end