How to Test Elasticsearch and Searchkick with RSpec How to Test Elasticsearch and Searchkick with RSpec elasticsearch elasticsearch

How to Test Elasticsearch and Searchkick with RSpec


Try:

expect(assigns(:businesses).results).to eq([business])

Also, in your Business model, combine your searchkick calls:

searchkick language: "Spanish",           autocomplete: ['commercial_name'],           word_start: [:name],           settings: {number_of_shards: 1}

(Separate calls will produce undesirable results and this will throw an error in the next release of Searchkick)