Skip to content

Commit 3ebd8da

Browse files
committed
Updates adapters/active_record/serialization spec
1 parent f9bcc23 commit 3ebd8da

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

elasticsearch-model/spec/elasticsearch/model/adapters/active_record/serialization_spec.rb

+9-7
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@
4141
context 'when a document is indexed' do
4242

4343
let(:search_result) do
44-
ArticleWithCustomSerialization.__elasticsearch__.client.get(index: 'article_with_custom_serializations',
45-
type: '_doc',
46-
id: '1')
44+
ArticleWithCustomSerialization.__elasticsearch__.client.get(
45+
index: 'article_with_custom_serializations',
46+
id: '1'
47+
)
4748
end
4849

4950
it 'applies the serialization when indexing' do
@@ -54,7 +55,7 @@
5455
context 'when a document is updated' do
5556

5657
before do
57-
article.update_attributes(title: 'UPDATED', status: 'yellow')
58+
article.update(title: 'UPDATED', status: 'yellow')
5859
ArticleWithCustomSerialization.__elasticsearch__.refresh_index!
5960
end
6061

@@ -65,9 +66,10 @@
6566
end
6667

6768
let(:search_result) do
68-
ArticleWithCustomSerialization.__elasticsearch__.client.get(index: 'article_with_custom_serializations',
69-
type: '_doc',
70-
id: article.id)
69+
ArticleWithCustomSerialization.__elasticsearch__.client.get(
70+
index: 'article_with_custom_serializations',
71+
id: article.id
72+
)
7173
end
7274

7375
it 'applies the serialization when updating' do

0 commit comments

Comments
 (0)