checks valid age

This commit is contained in:
rgarcia
2015-10-19 11:20:32 +02:00
parent 573b2425d0
commit 0a668ae39a
5 changed files with 33 additions and 6 deletions

View File

@@ -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