Fixed bug: Missing extend causes wrong delegate method to get called.

This commit is contained in:
Thorsten Eckel 2017-12-23 22:02:35 +01:00
parent e37328d201
commit 540eab58e3
2 changed files with 16 additions and 0 deletions

View file

@ -4,6 +4,7 @@ class Sequencer
module Common
module Model
class ResetPrimaryKeySequence < Sequencer::Unit::Base
extend Forwardable
uses :model_class

View file

@ -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