Fix spec assuming German isn't available

Since we've recently added German to the available languages, and we
might support every language in the future, we're using the fictional
world language to check a locale which isn't available.

Another option could be to set the available locales in the test
environment (or the rspec helper), but then we'd have to make sure it's
executed before the call to `globalize_accessors` in the model, and it
might be confusing for developers.
This commit is contained in:
Javi Martín
2018-10-23 13:53:37 +02:00
committed by decabeza
parent 0f759f1e16
commit 8f4d600b47

View File

@@ -55,7 +55,7 @@ RSpec.describe I18nContent, type: :model do
it 'responds to locales defined on model' do
expect(i18n_content).to respond_to(:value_en)
expect(i18n_content).to respond_to(:value_es)
expect(i18n_content).not_to respond_to(:value_de)
expect(i18n_content).not_to respond_to(:value_wl)
end
it 'returns nil if translations are not available' do