summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/background_migration/base_job_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/background_migration/base_job_spec.rb')
-rw-r--r--spec/lib/gitlab/background_migration/base_job_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/lib/gitlab/background_migration/base_job_spec.rb b/spec/lib/gitlab/background_migration/base_job_spec.rb
new file mode 100644
index 00000000000..86abe4257e4
--- /dev/null
+++ b/spec/lib/gitlab/background_migration/base_job_spec.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe Gitlab::BackgroundMigration::BaseJob, '#perform' do
+ let(:connection) { double(:connection) }
+
+ let(:test_job_class) { Class.new(described_class) }
+ let(:test_job) { test_job_class.new(connection: connection) }
+
+ describe '#perform' do
+ it 'raises an error if not overridden by a subclass' do
+ expect { test_job.perform }.to raise_error(NotImplementedError, /must implement perform/)
+ end
+ end
+end