adds specs

This commit is contained in:
rgarcia
2015-08-28 00:03:16 +02:00
parent 3ee68fd5d7
commit 9cce254c8d
12 changed files with 724 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
require 'rails_helper'
feature 'Level two verification' do
scenario 'Verification with residency and sms' do
user = create(:user)
login_as(user)
visit account_path
click_link 'Verify my account'
select 'Spanish ID', from: 'residence_document_type'
fill_in 'residence_document_number', with: "12345678Z"
select_date '31-December-1980', from: 'residence_date_of_birth'
fill_in 'residence_postal_code', with: '28013'
click_button 'Verify'
expect(page).to have_content 'Residence verified'
fill_in 'sms_phone', with: "611111111"
click_button 'Send'
expect(page).to have_content 'Security code confirmation'
user = user.reload
fill_in 'sms_confirmation_code', with: user.sms_confirmation_code
click_button 'Send'
expect(page).to have_content 'Correct code'
end
end