mirror of
https://github.com/discourse/discourse.git
synced 2024-12-15 10:03:42 +08:00
19 lines
504 B
Ruby
19 lines
504 B
Ruby
# 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
|