mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 22:14:32 +08:00
16 lines
335 B
Ruby
16 lines
335 B
Ruby
require 'spec_helper'
|
|
|
|
describe SearchController do
|
|
|
|
it 'performs the query' do
|
|
Search.expects(:query).with('test', nil, 3)
|
|
xhr :get, :query, term: 'test'
|
|
end
|
|
|
|
it 'performs the query with a filter' do
|
|
Search.expects(:query).with('test', 'topic', 3)
|
|
xhr :get, :query, term: 'test', type_filter: 'topic'
|
|
end
|
|
|
|
end
|