Merge pull request #3127 from consul/fix_date_order_translations

Bring back date order translations
This commit is contained in:
Javier Martín
2018-12-26 16:40:03 +01:00
committed by GitHub
53 changed files with 315 additions and 4 deletions

View File

@@ -24,4 +24,19 @@ feature 'Level two verification' do
expect(page).to have_content 'Code correct'
end
context "In Spanish, with no fallbacks" do
before do
skip unless I18n.available_locales.include?(:es)
allow(I18n.fallbacks).to receive(:[]).and_return([:es])
end
scenario "Works normally" do
user = create(:user)
login_as(user)
visit verification_path(locale: :es)
verify_residence
end
end
end

View File

@@ -10,12 +10,14 @@ module Verifications
def verify_residence
select 'DNI', from: 'residence_document_type'
fill_in 'residence_document_number', with: "12345678Z"
select_date '31-December-1980', from: 'residence_date_of_birth'
select_date "31-#{I18n.l(Date.current.at_end_of_year, format: "%B")}-1980",
from: "residence_date_of_birth"
fill_in 'residence_postal_code', with: '28013'
check 'residence_terms_of_service'
click_button 'Verify residence'
expect(page).to have_content 'Residence verified'
click_button "new_residence_submit"
expect(page).to have_content I18n.t("verification.residence.create.flash.success")
end
def officing_verify_residence