diff options
Diffstat (limited to 'spec/workers/namespaces')
5 files changed, 1 insertions, 80 deletions
diff --git a/spec/workers/namespaces/onboarding_issue_created_worker_spec.rb b/spec/workers/namespaces/onboarding_issue_created_worker_spec.rb deleted file mode 100644 index 0a896d864b7..00000000000 --- a/spec/workers/namespaces/onboarding_issue_created_worker_spec.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Namespaces::OnboardingIssueCreatedWorker, '#perform' do - let_it_be(:issue) { create(:issue) } - - let(:namespace) { issue.project.namespace } - - it_behaves_like 'records an onboarding progress action', :issue_created do - subject { described_class.new.perform(namespace.id) } - end - - it_behaves_like 'does not record an onboarding progress action' do - subject { described_class.new.perform(nil) } - end - - it_behaves_like 'an idempotent worker' do - let(:job_args) { [namespace.id] } - - it 'sets the onboarding progress action' do - Onboarding::Progress.onboard(namespace) - - subject - - expect(Onboarding::Progress.completed?(namespace, :issue_created)).to eq(true) - end - end -end diff --git a/spec/workers/namespaces/onboarding_pipeline_created_worker_spec.rb b/spec/workers/namespaces/onboarding_pipeline_created_worker_spec.rb deleted file mode 100644 index 6d69ccb50bd..00000000000 --- a/spec/workers/namespaces/onboarding_pipeline_created_worker_spec.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Namespaces::OnboardingPipelineCreatedWorker, '#perform' do - let_it_be(:ci_pipeline) { create(:ci_pipeline) } - - it_behaves_like 'records an onboarding progress action', :pipeline_created do - let(:namespace) { ci_pipeline.project.namespace } - - subject { described_class.new.perform(ci_pipeline.project.namespace_id) } - end - - it_behaves_like 'does not record an onboarding progress action' do - subject { described_class.new.perform(nil) } - end -end diff --git a/spec/workers/namespaces/onboarding_progress_worker_spec.rb b/spec/workers/namespaces/onboarding_progress_worker_spec.rb deleted file mode 100644 index 76ac078ddcf..00000000000 --- a/spec/workers/namespaces/onboarding_progress_worker_spec.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Namespaces::OnboardingProgressWorker, '#perform' do - let_it_be(:namespace) { create(:namespace) } - let_it_be(:action) { 'git_pull' } - - it_behaves_like 'records an onboarding progress action', :git_pull do - include_examples 'an idempotent worker' do - subject { described_class.new.perform(namespace.id, action) } - end - 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 diff --git a/spec/workers/namespaces/onboarding_user_added_worker_spec.rb b/spec/workers/namespaces/onboarding_user_added_worker_spec.rb deleted file mode 100644 index 14428c0ecb8..00000000000 --- a/spec/workers/namespaces/onboarding_user_added_worker_spec.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Namespaces::OnboardingUserAddedWorker, '#perform' do - let_it_be(:namespace) { create(:group) } - - subject { described_class.new.perform(namespace.id) } - - it_behaves_like 'records an onboarding progress action', :user_added -end diff --git a/spec/workers/namespaces/prune_aggregation_schedules_worker_spec.rb b/spec/workers/namespaces/prune_aggregation_schedules_worker_spec.rb index 11f2501cbe3..d8c60932d92 100644 --- a/spec/workers/namespaces/prune_aggregation_schedules_worker_spec.rb +++ b/spec/workers/namespaces/prune_aggregation_schedules_worker_spec.rb @@ -6,7 +6,7 @@ RSpec.describe Namespaces::PruneAggregationSchedulesWorker, '#perform', :clean_g include ExclusiveLeaseHelpers let(:namespaces) { create_list(:namespace, 5, :with_aggregation_schedule) } - let(:timeout) { Namespace::AggregationSchedule::DEFAULT_LEASE_TIMEOUT } + let(:timeout) { Namespace::AggregationSchedule.default_lease_timeout } subject(:worker) { described_class.new } |