diff --git a/lib/import/base.rb b/lib/import/base.rb index 331772f1c..a42839c7c 100644 --- a/lib/import/base.rb +++ b/lib/import/base.rb @@ -3,6 +3,17 @@ module Import class Base + # Checks if the backend is active. + # + # @example + # Import::ExampleBackend.active? + # #=> true + # + # return [Boolean] + def self.active? + true + end + # Checks if the backend is able to get queued by the Scheduler. # # @example diff --git a/spec/lib/import/base_spec.rb b/spec/lib/import/base_spec.rb index 148c6c5f6..ea8be7c24 100644 --- a/spec/lib/import/base_spec.rb +++ b/spec/lib/import/base_spec.rb @@ -4,6 +4,13 @@ require 'lib/import/import_job_backend_examples' RSpec.describe Import::Base do it_behaves_like 'ImportJob backend' + describe '#active?' do + + it 'returns true by default' do + expect(described_class.active?).to be true + end + end + describe '#queueable?' do it 'returns true by default' do