我将chewy用于ES,并将VCR用于查询。
例如。
这不是搜索查询。
it 'when a user' do
VCR.use_cassette('elasticsearch_query') do
search = Search.new(params: params, current_user: user, current_team: team)
expect(search.current_user).to eq(user)
end
end
vcr文件,我看到以下响应。 为什么?
string: '{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no
- such index","resource.type":"index_or_alias","resource.id":"test_leads","index_uuid":"_na_","index":"test_leads"}],"type":"index_not_found_exception","reason":"no
- such index","resource.type":"index_or_alias","resource.id":"test_leads","index_uuid":"_na_","index":"test_leads"},"status":404}'`