Merge pull request #822 from consul/advanced-search

Advanced search
This commit is contained in:
Juanjo Bazán
2016-01-18 15:17:17 +01:00
21 changed files with 1084 additions and 178 deletions

View File

@@ -395,6 +395,13 @@ describe Proposal do
expect(results).to eq([proposal])
end
it "searches by author name" do
author = create(:user, username: 'Danny Trejo')
proposal = create(:proposal, author: author)
results = Proposal.search('Danny')
expect(results).to eq([proposal])
end
end
context "stemming" do