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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/workers/onboarding/progress_worker_spec.rb')
-rw-r--r--spec/workers/onboarding/progress_worker_spec.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/workers/onboarding/progress_worker_spec.rb b/spec/workers/onboarding/progress_worker_spec.rb
new file mode 100644
index 00000000000..bbf4875069e
--- /dev/null
+++ b/spec/workers/onboarding/progress_worker_spec.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe Onboarding::ProgressWorker, '#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