Improve specs texts
This commit is contained in:
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user