checks valid age
This commit is contained in:
@@ -62,4 +62,14 @@ feature 'DocumentVerifications' do
|
||||
expect(page).to have_content "Document number: 12345H"
|
||||
end
|
||||
|
||||
scenario 'User age is checked' do
|
||||
expect_any_instance_of(Verification::Management::Document).to receive(:under_sixteen?).and_return(true)
|
||||
|
||||
visit management_document_verifications_path
|
||||
fill_in 'document_verification_document_number', with: '1234'
|
||||
click_button 'Check'
|
||||
|
||||
expect(page).to have_content "You must be over 16 to verify your account."
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user