I'm not sure whether we should rename the class instead. I'm renaming the method because renaming the class would require more changes.
14 lines
551 B
Ruby
14 lines
551 B
Ruby
require "rails_helper"
|
|
|
|
describe RemoteTranslations::Microsoft::AvailableLocales do
|
|
describe ".locales" do
|
|
it "includes locales with the same format as I18n.available_locales" do
|
|
allow(RemoteTranslations::Microsoft::AvailableLocales).to receive(:remote_available_locales)
|
|
.and_return(%w[de en es fr pt zh-Hans])
|
|
|
|
available_locales = RemoteTranslations::Microsoft::AvailableLocales.locales
|
|
expect(available_locales).to eq %w[de en es fr pt-BR zh-CN]
|
|
end
|
|
end
|
|
end
|