refactors lock tries [#279]
This commit is contained in:
@@ -57,23 +57,23 @@ feature 'SMS Verification' do
|
||||
expect(URI.parse(current_url).path).to eq(new_residence_path)
|
||||
end
|
||||
|
||||
scenario '3 tries allowed' do
|
||||
scenario '5 tries allowed' do
|
||||
user = create(:user, residence_verified_at: Time.now)
|
||||
login_as(user)
|
||||
|
||||
visit new_sms_path
|
||||
|
||||
3.times do
|
||||
5.times do
|
||||
fill_in 'sms_phone', with: "611111111"
|
||||
click_button 'Send'
|
||||
click_link 'Click here to send the confirmation code again'
|
||||
end
|
||||
|
||||
expect(page).to have_content 'You have reached the maximum number of sms verification tries'
|
||||
expect(page).to have_content "You have reached the maximum number of verification tries. Please try again later."
|
||||
expect(URI.parse(current_url).path).to eq(account_path)
|
||||
|
||||
visit new_sms_path
|
||||
expect(page).to have_content 'You have reached the maximum number of sms verification tries'
|
||||
expect(page).to have_content "You have reached the maximum number of verification tries. Please try again later."
|
||||
expect(URI.parse(current_url).path).to eq(account_path)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user