mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-04-28 23:14:04 -04:00
FIX: remove broken find topic id feature
This commit is contained in:
parent
c96a84456d
commit
aa7ed0b2ba
2 changed files with 0 additions and 12 deletions
|
@ -104,8 +104,6 @@ class Search
|
||||||
return single_topic(route[:topic_id]).as_json if route[:topic_id].present?
|
return single_topic(route[:topic_id]).as_json if route[:topic_id].present?
|
||||||
rescue ActionController::RoutingError
|
rescue ActionController::RoutingError
|
||||||
end
|
end
|
||||||
|
|
||||||
return single_topic(@term.to_i).as_json if @term =~ /^\d+$/
|
|
||||||
end
|
end
|
||||||
|
|
||||||
find_grouped_results.as_json
|
find_grouped_results.as_json
|
||||||
|
|
|
@ -199,16 +199,6 @@ describe Search do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context "search for a topic by id" do
|
|
||||||
let(:result) { first_of_type(Search.new(topic.id, type_filter: 'topic', min_search_term_length: 1).execute, 'topic') }
|
|
||||||
|
|
||||||
it 'returns the topic' do
|
|
||||||
result.should be_present
|
|
||||||
result[:title].should == topic.title
|
|
||||||
result[:url].should == topic.relative_url
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context "search for a topic by url" do
|
context "search for a topic by url" do
|
||||||
let(:result) { first_of_type(Search.new(topic.relative_url, type_filter: 'topic').execute, 'topic') }
|
let(:result) { first_of_type(Search.new(topic.relative_url, type_filter: 'topic').execute, 'topic') }
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue