Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions app/controllers/idv/enter_password_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ def new
@title = title
@heading = heading

flash_now = flash.now
if gpo_mail_service.mail_spammed?
flash_now[:error] = t('idv.errors.mail_limit_reached')
end

@verifying_by_mail = address_verification_method == 'gpo'
end

Expand Down
1 change: 0 additions & 1 deletion config/locales/idv/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ en:
start_over: Start over verifying your identity
errors:
incorrect_password: The password you entered is not correct.
mail_limit_reached: You have requested too much mail in the last month.
pattern_mismatch:
ssn: 'Enter a nine-digit Social Security number'
zipcode: Enter a 5 or 9 digit ZIP Code
Expand Down
1 change: 0 additions & 1 deletion config/locales/idv/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ es:
start_over: Empezar de nuevo a verificar su identidad
errors:
incorrect_password: La contrase帽a que ingres贸 no es correcta.
mail_limit_reached: Usted ha solicitado demasiado correo en el 煤ltimo mes.
pattern_mismatch:
ssn: 'Ingrese un n煤mero de Seguro Social de nueve d铆gitos'
zipcode: Ingresa un c贸digo postal de 5 o 9 d铆gitos
Expand Down
1 change: 0 additions & 1 deletion config/locales/idv/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ fr:
start_over: Recommencez la v茅rification de votre identit茅
errors:
incorrect_password: Le mot de passe que vous avez inscrit est incorrect.
mail_limit_reached: Vous avez demand茅 trop de lettres au cours du dernier mois.
pattern_mismatch:
ssn: 'Entrez un num茅ro de s茅curit茅 sociale 脿 neuf chiffres'
zipcode: Entrez un code postal 脿 5 ou 9 chiffres
Expand Down
30 changes: 0 additions & 30 deletions spec/controllers/idv/enter_password_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,36 +222,6 @@ def show
end
end

context 'user has not requested too much mail' do
before do
idv_session.address_verification_mechanism = 'gpo'
gpo_mail_service = instance_double(Idv::GpoMail)
allow(Idv::GpoMail).to receive(:new).with(user).and_return(gpo_mail_service)
allow(gpo_mail_service).to receive(:mail_spammed?).and_return(false)
end

it 'displays a success message' do
get :new

expect(flash.now[:error]).to be_nil
end
end

context 'user has requested too much mail' do
before do
idv_session.address_verification_mechanism = 'gpo'
gpo_mail_service = instance_double(Idv::GpoMail)
allow(Idv::GpoMail).to receive(:new).with(user).and_return(gpo_mail_service)
allow(gpo_mail_service).to receive(:mail_spammed?).and_return(true)
end

it 'displays a helpful error message' do
get :new

expect(flash.now[:error]).to eq t('idv.errors.mail_limit_reached')
end
end

it 'redirects to the verify info controller if the user has not completed it' do
controller.idv_session.resolution_successful = nil

Expand Down