mirror of
https://github.com/docusealco/docuseal
synced 2026-11-08 15:42:32 -05:00
improve user email validation
This commit is contained in:
1 parent
8b9678a434
commit
fa0733f480
4 files changed
+37
No files matched your search
@@ -92,6 +92,23 @@ RSpec.describe 'Team Settings' do
|
||||
end
|
||||
end
|
||||
|
||||
it 'does not allow to create a new user with an invalid email' do
|
||||
click_link 'New User'
|
||||
|
||||
within '#modal' do
|
||||
fill_in 'First name', with: 'Joseph'
|
||||
fill_in 'Last name', with: 'Smith'
|
||||
fill_in 'Email', with: 'joseph.smith@gmail'
|
||||
fill_in 'Password', with: 'password'
|
||||
|
||||
expect do
|
||||
click_button 'Submit'
|
||||
end.not_to change(User, :count)
|
||||
|
||||
expect(page).to have_content('Email is invalid')
|
||||
end
|
||||
end
|
||||
|
||||
it 'updates a user' do
|
||||
first(:link, 'Edit').click
|
||||
|
||||
|
||||
Reference in new issue
Block a user