Fixed bug: Missing extend causes wrong delegate method to get called.
This commit is contained in:
parent
e37328d201
commit
540eab58e3
2 changed files with 16 additions and 0 deletions
|
@ -4,6 +4,7 @@ class Sequencer
|
|||
module Common
|
||||
module Model
|
||||
class ResetPrimaryKeySequence < Sequencer::Unit::Base
|
||||
extend Forwardable
|
||||
|
||||
uses :model_class
|
||||
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Sequencer::Unit::Import::Common::Model::ResetPrimaryKeySequence, sequencer: :unit do
|
||||
|
||||
it 'calls DbHelper.import_post for given model_class' do
|
||||
|
||||
model_class = ::User
|
||||
|
||||
expect(DbHelper).to receive(:import_post).with(model_class.table_name)
|
||||
|
||||
provided = process(
|
||||
model_class: model_class,
|
||||
)
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue