discourse/spec/controllers/search_controller_spec.rb
2013-05-13 11:07:22 +10:00

15 lines
345 B
Ruby

require 'spec_helper'
describe SearchController do
it 'performs the query' do
Search.expects(:query).with('test', nil, nil, 3)
xhr :get, :query, term: 'test'
end
it 'performs the query with a filter' do
Search.expects(:query).with('test', nil, 'topic', 3)
xhr :get, :query, term: 'test', type_filter: 'topic'
end
end