DEV: Add spec to find MF locale for en_US

Follow-up to aecadcb267
This commit is contained in:
Gerhard Schlager 2020-01-16 14:40:53 +01:00
parent a2fd8ac990
commit eeb2855a48
1 changed files with 11 additions and 0 deletions

View File

@ -207,4 +207,15 @@ describe JsLocaleHelper do
end
end
describe ".find_message_format_locale" do
it "finds locale for en_US" do
locale, filename = JsLocaleHelper.find_message_format_locale([:en_US], fallback_to_english: false)
expect(locale).to eq("en")
expect(filename).to end_with("/en.js")
locale, filename = JsLocaleHelper.find_message_format_locale(["en_US"], fallback_to_english: false)
expect(locale).to eq("en")
expect(filename).to end_with("/en.js")
end
end
end