class SidekiqUniqueJobs::RSpec::Matchers::HaveValidSidekiqOptions


@author Mikael Henriksson <mikael@mhenrixon.com>
Class HaveValidSidekiqOptions validates the unique/lock configuration for a worker.

def description

:nodoc:
def description
  "have valid sidekiq options"
end

def failure_message

:nodoc:
def failure_message
  <<~FAILURE_MESSAGE
    Expected #{worker} to have valid sidekiq options but found the following problems:
    #{lock_config.errors_as_string}
  FAILURE_MESSAGE
end

def matches?(worker)

def matches?(worker)
  @worker          = worker
  @sidekiq_options = worker.get_sidekiq_options
  @lock_config     = SidekiqUniqueJobs.validate_worker(sidekiq_options)
  lock_config.valid?
end