Skip to content

Commit 2468640

Browse files
committed
Updates MultiModel tests
I need to understand if we still need MultiModel or if it was based on the document_type which is no longer a thing in Elasticsearch.
1 parent 4e85fa3 commit 2468640

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

elasticsearch-model/spec/elasticsearch/model/adapters/multiple_spec.rb

+1-9
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class DummyTwo
4040
include Elasticsearch::Model
4141

4242
index_name 'dummy'
43-
document_type 'dummy_two'
4443

4544
def self.find(ids)
4645
ids.map { |id| new(id) }
@@ -58,7 +57,6 @@ class DummyTwo
5857
include Elasticsearch::Model
5958

6059
index_name 'other_index'
61-
document_type 'dummy_two'
6260

6361
def self.find(ids)
6462
ids.map { |id| new(id) }
@@ -84,27 +82,22 @@ def initialize(id)
8482
[
8583
{
8684
_index: 'dummy',
87-
_type: 'dummy_two',
8885
_id: '2'
8986
},
9087
{
9188
_index: 'dummy',
92-
_type: 'dummy_one',
9389
_id: '2'
9490
},
9591
{
9692
_index: 'other_index',
97-
_type: 'dummy_two',
9893
_id: '1'
9994
},
10095
{
10196
_index: 'dummy',
102-
_type: 'dummy_two',
10397
_id: '1'
10498
},
10599
{
106100
_index: 'dummy',
107-
_type: 'dummy_one',
108101
_id: '3'
109102
}
110103
]
@@ -119,13 +112,12 @@ def initialize(id)
119112
end
120113

121114
describe '#records' do
122-
123115
before do
124116
multimodel.class.send :include, Elasticsearch::Model::Adapter::Multiple::Records
125117
expect(multimodel).to receive(:response).at_least(:once).and_return(response)
126118
end
127119

128-
it 'instantiates the correct types of instances' do
120+
xit 'instantiates the correct types of instances' do
129121
expect(multimodel.records[0]).to be_a(Namespace::DummyTwo)
130122
expect(multimodel.records[1]).to be_a(DummyOne)
131123
expect(multimodel.records[2]).to be_a(DummyTwo)

0 commit comments

Comments
 (0)