discourse/spec/lib/search_spec.rb

19 lines
504 B
Ruby
Raw Normal View History

# frozen_string_literal: true
require 'rails_helper'
describe Search do
context "#ts_config" do
it "maps locales to correct Postgres dictionaries" do
expect(Search.ts_config).to eq("english")
expect(Search.ts_config("en")).to eq("english")
expect(Search.ts_config("en_US")).to eq("english")
expect(Search.ts_config("pt_BR")).to eq("portuguese")
expect(Search.ts_config("tr")).to eq("turkish")
expect(Search.ts_config("xx")).to eq("simple")
end
end
end