Skip to content

Commit 9c186c9

Browse files
committed
Fix linter problems
1 parent b0248af commit 9c186c9

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

lib/meilisearch/rails/multi_search.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ def multi_search(searches)
1212
MultiSearchResult.new(searches, client.multi_search(search_parameters))
1313
end
1414

15-
1615
private
1716

1817
def normalize(options, index_target)

spec/multi_search_spec.rb

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,31 @@
44
def reset_indexes
55
[Book, Color, Product].each do |klass|
66
klass.delete_all
7-
klass.clear_index!
7+
klass.clear_index!(true)
88
end
99
end
1010

11-
before { reset_indexes }
12-
13-
let!(:palm_pixi_plus) { Product.create!(name: 'palm pixi plus', href: 'ebay', tags: ['terrible']) }
14-
let!(:steve_jobs) { Book.create! name: 'Steve Jobs', author: 'Walter Isaacson' }
15-
let!(:blue) { Color.create!(name: 'blue', short_name: 'blu', hex: 0x0000FF) }
16-
let!(:black) { Color.create!(name: 'black', short_name: 'bla', hex: 0x000000) }
17-
1811
before do
12+
reset_indexes
13+
14+
Product.create! name: 'palm pixi plus', href: 'ebay', tags: ['terrible']
1915
Product.create! name: 'lg vortex', href: 'ebay', tags: ['decent']
2016
Product.create! name: 'palmpre', href: 'ebay', tags: ['discontinued', 'worst phone ever']
2117
Product.reindex!
2218

19+
Color.create! name: 'blue', short_name: 'blu', hex: 0x0000FF
20+
Color.create! name: 'black', short_name: 'bla', hex: 0x000000
2321
Color.create! name: 'green', short_name: 'gre', hex: 0x00FF00
22+
23+
Book.create! name: 'Steve Jobs', author: 'Walter Isaacson'
2424
Book.create! name: 'Moby Dick', author: 'Herman Melville'
2525
end
2626

27+
let!(:palm_pixi_plus) { Product.find_by name: 'palm pixi plus' }
28+
let!(:steve_jobs) { Book.find_by name: 'Steve Jobs' }
29+
let!(:blue) { Color.find_by name: 'blue' }
30+
let!(:black) { Color.find_by name: 'black' }
31+
2732
context 'with class keys' do
2833
it 'returns ORM records' do
2934
results = MeiliSearch::Rails.multi_search(
@@ -96,7 +101,7 @@ def reset_indexes
96101
end
97102

98103
context 'with pagination' do
99-
it 'it properly paginates each search' do
104+
it 'properly paginates each search' do
100105
MeiliSearch::Rails.configuration[:pagination_backend] = :kaminari
101106

102107
results = MeiliSearch::Rails.multi_search(

0 commit comments

Comments
 (0)