diff --git a/app/forms/otp_delivery_selection_form.rb b/app/forms/otp_delivery_selection_form.rb index 75b34f515f2..19053e1b4b1 100644 --- a/app/forms/otp_delivery_selection_form.rb +++ b/app/forms/otp_delivery_selection_form.rb @@ -46,7 +46,7 @@ def extra_analytics_attributes { otp_delivery_preference: otp_delivery_preference, resend: resend, - country_code: parsed_phone.country_code, + country_code: parsed_phone.country, area_code: parsed_phone.area_code, context: context, } diff --git a/spec/controllers/users/two_factor_authentication_controller_spec.rb b/spec/controllers/users/two_factor_authentication_controller_spec.rb index 0f7173ce72b..7d51402b7aa 100644 --- a/spec/controllers/users/two_factor_authentication_controller_spec.rb +++ b/spec/controllers/users/two_factor_authentication_controller_spec.rb @@ -167,7 +167,7 @@ def index otp_delivery_preference: 'sms', resend: nil, context: 'authentication', - country_code: '1', + country_code: 'US', area_code: '202', } @@ -236,7 +236,7 @@ def index otp_delivery_preference: 'voice', resend: nil, context: 'authentication', - country_code: '1', + country_code: 'US', area_code: '202', } @@ -341,7 +341,7 @@ def index otp_delivery_preference: 'sms', resend: nil, context: 'confirmation', - country_code: '1', + country_code: 'US', area_code: '202', } twilio_error = "[HTTP 400] : error message\n\n" @@ -379,7 +379,7 @@ def index otp_delivery_preference: 'sms', resend: nil, context: 'confirmation', - country_code: '1', + country_code: 'US', area_code: '202', } twilio_error_hash = { diff --git a/spec/forms/otp_delivery_selection_form_spec.rb b/spec/forms/otp_delivery_selection_form_spec.rb index d1a50d84ae0..2ab054ae758 100644 --- a/spec/forms/otp_delivery_selection_form_spec.rb +++ b/spec/forms/otp_delivery_selection_form_spec.rb @@ -25,7 +25,7 @@ extra = { otp_delivery_preference: 'sms', resend: true, - country_code: '1', + country_code: 'US', area_code: '202', context: 'authentication', }