discourse/spec/controllers/search_controller_spec.rb

16 lines
335 B
Ruby
Raw Normal View History

2013-02-06 03:16:51 +08:00
require 'spec_helper'
describe SearchController do
it 'performs the query' do
Search.expects(:query).with('test', nil, 3)
2013-02-06 03:16:51 +08:00
xhr :get, :query, term: 'test'
end
it 'performs the query with a filter' do
Search.expects(:query).with('test', 'topic', 3)
2013-02-06 03:16:51 +08:00
xhr :get, :query, term: 'test', type_filter: 'topic'
end
end