@@ -60,7 +60,6 @@ def importing_mixin
6060
6161 before do
6262 allow ( DummyImportingModel ) . to receive ( :index_name ) . and_return ( 'foo' )
63- allow ( DummyImportingModel ) . to receive ( :document_type ) . and_return ( 'foo' )
6463 allow ( DummyImportingModel ) . to receive ( :index_exists? ) . and_return ( true )
6564 allow ( DummyImportingModel ) . to receive ( :__batch_to_bulk )
6665 allow ( client ) . to receive ( :bulk ) . and_return ( response )
@@ -159,26 +158,14 @@ def importing_mixin
159158
160159 before do
161160 expect ( DummyImportingModel ) . to receive ( :client ) . and_return ( client )
162- expect ( client ) . to receive ( :bulk ) . with ( body : nil , index : 'my-new-index' , type : 'foo' ) . and_return ( response )
161+ expect ( client ) . to receive ( :bulk ) . with ( body : nil , index : 'my-new-index' ) . and_return ( response )
163162 end
164163
165164 it 'uses the alternate index name' do
166165 expect ( DummyImportingModel . import ( index : 'my-new-index' ) ) . to eq ( 0 )
167166 end
168167 end
169168
170- context 'when a different document type is provided' do
171-
172- before do
173- expect ( DummyImportingModel ) . to receive ( :client ) . and_return ( client )
174- expect ( client ) . to receive ( :bulk ) . with ( body : nil , index : 'foo' , type : 'my-new-type' ) . and_return ( response )
175- end
176-
177- it 'uses the alternate index name' do
178- expect ( DummyImportingModel . import ( type : 'my-new-type' ) ) . to eq ( 0 )
179- end
180- end
181-
182169 context 'the transform method' do
183170
184171 before do
@@ -232,7 +219,7 @@ def importing_mixin
232219
233220 before do
234221 expect ( DummyImportingModel ) . to receive ( :client ) . and_return ( client )
235- expect ( client ) . to receive ( :bulk ) . with ( body : nil , index : 'foo' , type : 'foo' , pipeline : 'my-pipeline' ) . and_return ( response )
222+ expect ( client ) . to receive ( :bulk ) . with ( body : nil , index : 'foo' , pipeline : 'my-pipeline' ) . and_return ( response )
236223 end
237224
238225 it 'uses the pipeline option' do
0 commit comments