Sha256: 33d881601938d608045998c701837bb096c49fcdcaf4f5d347c822bb20b60990
Contents?: true
Size: 478 Bytes
Versions: 36
Compression:
Stored size: 478 Bytes
Contents
# frozen_string_literal: true describe SuggestController do routes { Blacklight::Engine.routes } describe 'GET index' do it 'returns JSON' do get :index, params: { format: 'json' } expect(response.body).to eq [].to_json end it 'returns suggestions' do get :index, params: { format: 'json', q: 'new' } json = JSON.parse(response.body) expect(json.count).to eq 3 expect(json.first['term']).to eq 'new jersey' end end end
Version data entries
36 entries across 36 versions & 1 rubygems