Rename AvailableLocales.available_locales method
I'm not sure whether we should rename the class instead. I'm renaming the method because renaming the class would require more changes.
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
require "rails_helper"
|
||||
|
||||
describe RemoteTranslations::Microsoft::AvailableLocales do
|
||||
describe ".available_locales" 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.available_locales
|
||||
available_locales = RemoteTranslations::Microsoft::AvailableLocales.locales
|
||||
expect(available_locales).to eq %w[de en es fr pt-BR zh-CN]
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user