improve user email validation

This commit is contained in:
Alex Turchyn
2025-05-28 19:11:39 +03:00
committed by Pete Matsyburka
parent 8b9678a434
commit fa0733f480
4 changed files with 37 additions and 0 deletions
+8
View File
@@ -33,6 +33,14 @@ RSpec.describe 'Profile Settings' do
expect(user.last_name).to eq('Beckham')
expect(user.email).to eq('david.beckham@example.com')
end
it 'does not update if email is invalid' do
fill_in 'Email', with: 'devid+test@example'
all(:button, 'Update')[0].click
expect(page).to have_content('Email is invalid')
end
end
context 'when changes password' do