This repository has been archived on 2025-05-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
discourse/spec/controllers/search_controller_spec.rb
2013-02-05 14:16:51 -05:00

16 lines
330 B
Ruby

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