Get search dictionary based on I18n.default_locale (merge pull request #3856)

Implementation tries to be open for further extensions, such as deciding on
search dictionary based on configuration option or by locale set for
given user.
This commit is contained in:
Paweł Świątkowski
2020-04-12 14:22:36 +02:00
committed by GitHub
parent 426c1c5fd2
commit d99875cde2
8 changed files with 94 additions and 13 deletions

View File

@@ -503,7 +503,7 @@ describe Debate do
end
context "stemming" do
it "searches word stems" do
it "searches word stems in Spanish", :spanish_search do
debate = create(:debate, title: "limpiar")
results = Debate.search("limpiará")

View File

@@ -558,7 +558,7 @@ describe Proposal do
end
context "case" do
it "searches case insensite" do
it "searches case insensitive" do
proposal = create(:proposal, title: "SHOUT")
results = Proposal.search("shout")