add languages
This commit is contained in:
committed by
Oleksandr Turchyn
parent
dd502e8cef
commit
c7b08e8d30
@@ -16,7 +16,7 @@ RSpec.describe 'Account Settings' do
|
||||
expect(page).to have_content('Account')
|
||||
expect(page).to have_field('Company name', with: account.name)
|
||||
expect(page).to have_field('Time zone', with: account.timezone)
|
||||
expect(page).to have_field('Time format', with: account.locale)
|
||||
expect(page).to have_field('Language', with: account.locale)
|
||||
expect(page).to have_field('App URL', with: encrypted_config.value)
|
||||
end
|
||||
|
||||
@@ -24,7 +24,7 @@ RSpec.describe 'Account Settings' do
|
||||
fill_in 'Company name', with: 'New Company Name'
|
||||
fill_in 'App URL', with: 'https://example.com'
|
||||
select '(GMT+01:00) Berlin', from: 'Time zone'
|
||||
select 'Spanish (Spain)', from: 'Time format'
|
||||
select 'Español', from: 'Language'
|
||||
|
||||
click_button 'Update'
|
||||
|
||||
@@ -36,4 +36,21 @@ RSpec.describe 'Account Settings' do
|
||||
expect(account.locale).to eq('es-ES')
|
||||
expect(encrypted_config.value).to eq('https://example.com')
|
||||
end
|
||||
|
||||
it 'changes the account language' do
|
||||
select 'Deutsch', from: 'Language'
|
||||
|
||||
click_button 'Update'
|
||||
|
||||
account.reload
|
||||
encrypted_config.reload
|
||||
|
||||
expect(account.locale).to eq('de-DE')
|
||||
expect(page).to have_content('Konto')
|
||||
expect(page).to have_field('Firmenname', with: account.name)
|
||||
expect(page).to have_field('Zeitzone', with: account.timezone)
|
||||
expect(page).to have_field('Sprache', with: account.locale)
|
||||
expect(page).to have_field('App-URL', with: encrypted_config.value)
|
||||
expect(page).to have_button('Aktualisieren')
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user