Improve specs texts

This commit is contained in:
taitus
2020-02-26 12:14:05 +01:00
parent 2f500a6b56
commit c5c771f011

View File

@@ -32,20 +32,20 @@ describe "Remote Translations" do
end end
end end
context "with locale that has :en fallback" do context "with locale that has :es fallback" do
before do before do
allow(I18n.fallbacks).to receive(:[]).and_return([:es]) allow(I18n.fallbacks).to receive(:[]).and_return([:es])
Globalize.set_fallbacks_to_all_available_locales Globalize.set_fallbacks_to_all_available_locales
end end
scenario "with locale that has :es fallback" do scenario "should display text in Spanish" do
visit root_path(locale: :fr) visit root_path(locale: :fr)
expect(page).to have_css ".remote-translations-button" expect(page).to have_css ".remote-translations-button"
expect(page).to have_content "El contenido de esta página no está disponible en tu idioma" expect(page).to have_content "El contenido de esta página no está disponible en tu idioma"
end end
scenario "with locale that has :es fallback and need parse key" do scenario "should display text in Spanish after parse key" do
visit root_path(locale: :"pt-BR") visit root_path(locale: :"pt-BR")
expect(page).to have_css ".remote-translations-button" expect(page).to have_css ".remote-translations-button"