diff --git a/app/assets/stylesheets/_state-file.scss b/app/assets/stylesheets/_state-file.scss index a20de513ec..5ab8a91163 100644 --- a/app/assets/stylesheets/_state-file.scss +++ b/app/assets/stylesheets/_state-file.scss @@ -288,7 +288,9 @@ } .question-with-follow-up__follow-up { - margin: 0; + :not(.not-centered) { + margin: 0; + } p.form-question { font-size: 1.3rem; diff --git a/app/controllers/flows_controller.rb b/app/controllers/flows_controller.rb index e0714f95c4..33870908be 100644 --- a/app/controllers/flows_controller.rb +++ b/app/controllers/flows_controller.rb @@ -565,7 +565,6 @@ def self.common_attributes spouse_esigned: "yes", spouse_esigned_at: 1.minute.ago, payment_or_deposit_type: "mail", - bank_name: 'bank name', account_type: 'unfilled', routing_number: '111111111', account_number: '2222222222', diff --git a/app/forms/state_file/md_tax_refund_form.rb b/app/forms/state_file/md_tax_refund_form.rb index e32e2a11ee..06f8540bc6 100644 --- a/app/forms/state_file/md_tax_refund_form.rb +++ b/app/forms/state_file/md_tax_refund_form.rb @@ -6,16 +6,29 @@ class MdTaxRefundForm < QuestionsForm :routing_number, :account_number, :account_type, - :bank_name, - :account_holder_name + :account_holder_first_name, + :account_holder_middle_initial, + :account_holder_last_name, + :account_holder_suffix, + :has_joint_account_holder, + :joint_account_holder_first_name, + :joint_account_holder_middle_initial, + :joint_account_holder_last_name, + :joint_account_holder_suffix, + :bank_authorization_confirmed set_attributes_for :confirmation, :routing_number_confirmation, :account_number_confirmation validates :payment_or_deposit_type, presence: true - with_options unless: -> { payment_or_deposit_type == "mail" } do - validates :account_holder_name, presence: true + SUFFIX_OPTIONS = %w[JR SR I II III IV V VI VII VIII IX X] - validates :bank_name, presence: true + with_options unless: -> { payment_or_deposit_type == "mail" } do + validates :account_holder_first_name, presence: true + validates :account_holder_last_name, presence: true + validates :account_holder_first_name, format: { with: /\A[a-zA-Z0-9]([A-Za-z0-9\-\s']{0,15})\z/.freeze, message: ->(_object, _data) { I18n.t('errors.attributes.first_name.invalid_format') }} + validates :account_holder_last_name, format: { with: /\A[a-zA-Z0-9]([A-Za-z0-9\-\s']{0,31})\z/.freeze, message: ->(_object, _data) { I18n.t('errors.attributes.last_name.invalid_format') }} + validates :account_holder_middle_initial, length: { maximum: 1 }, format: { with: /\A[A-Za-z]\z/.freeze, allow_blank: true } + validates :account_holder_suffix, inclusion: { in: SUFFIX_OPTIONS }, allow_blank: true, if: -> { account_holder_suffix.present? } validates :account_type, presence: true validates :account_number, presence: true, confirmation: true, length: { in: 5..17 }, numericality: true @@ -24,9 +37,20 @@ class MdTaxRefundForm < QuestionsForm validates :routing_number, presence: true, confirmation: true, routing_number: true validates :routing_number_confirmation, presence: true + validates :bank_authorization_confirmed, acceptance: { accept: 'yes', message: ->(_object, _data) { I18n.t("state_file.questions.md_tax_refund.md_bank_details.bank_authorization_confirmation_error") }} + with_options if: -> { account_number.present? && routing_number.present? } do validate :bank_numbers_not_equal end + + with_options if: -> { has_joint_account_holder == 'yes' } do + validates :joint_account_holder_first_name, presence: true + validates :joint_account_holder_last_name, presence: true + validates :joint_account_holder_first_name, format: { with: /\A[a-zA-Z0-9]([A-Za-z0-9\-\s']{0,15})\z/.freeze, message: ->(_object, _data) { I18n.t('errors.attributes.first_name.invalid_format') }} + validates :joint_account_holder_last_name, format: { with: /\A[a-zA-Z0-9]([A-Za-z0-9\-\s']{0,31})\z/.freeze, message: ->(_object, _data) { I18n.t('errors.attributes.last_name.invalid_format') }} + validates :joint_account_holder_middle_initial, length: { maximum: 1 }, format: { with: /\A[A-Za-z]\z/.freeze, allow_blank: true } + validates :joint_account_holder_suffix, inclusion: { in: SUFFIX_OPTIONS }, allow_blank: true, if: -> { joint_account_holder_suffix.present? } + end end def save @@ -35,7 +59,7 @@ def save def self.existing_attributes(intake) attributes = super - attributes.except(:routing_number, :account_number, :routing_number_confirmation, :account_number_confirmation, :bank_name) + attributes.except(:routing_number, :account_number, :routing_number_confirmation, :account_number_confirmation) end private diff --git a/app/forms/state_file/tax_refund_form.rb b/app/forms/state_file/tax_refund_form.rb index 0fb5fa470f..c3f6534370 100644 --- a/app/forms/state_file/tax_refund_form.rb +++ b/app/forms/state_file/tax_refund_form.rb @@ -5,14 +5,12 @@ class TaxRefundForm < QuestionsForm :payment_or_deposit_type, :routing_number, :account_number, - :account_type, - :bank_name + :account_type set_attributes_for :confirmation, :routing_number_confirmation, :account_number_confirmation validates :payment_or_deposit_type, presence: true with_options unless: -> { payment_or_deposit_type == "mail" } do - validates :bank_name, presence: true validates :account_type, presence: true validates :account_number, presence: true, confirmation: true, length: { in: 5..17 }, numericality: true @@ -32,7 +30,7 @@ def save def self.existing_attributes(intake) attributes = super - attributes.except(:routing_number, :account_number, :routing_number_confirmation, :account_number_confirmation, :bank_name) + attributes.except(:routing_number, :account_number, :routing_number_confirmation, :account_number_confirmation) end private diff --git a/app/forms/state_file/taxes_owed_form.rb b/app/forms/state_file/taxes_owed_form.rb index e21120b641..3a7a137bb1 100644 --- a/app/forms/state_file/taxes_owed_form.rb +++ b/app/forms/state_file/taxes_owed_form.rb @@ -6,7 +6,6 @@ class TaxesOwedForm < TaxRefundForm :routing_number, :account_number, :account_type, - :bank_name, :withdraw_amount set_attributes_for :confirmation, :routing_number_confirmation, :account_number_confirmation diff --git a/app/lib/efile/line_data.yml b/app/lib/efile/line_data.yml index 99d7070479..e4b0044b71 100644 --- a/app/lib/efile/line_data.yml +++ b/app/lib/efile/line_data.yml @@ -650,6 +650,10 @@ MD502_LINE_34: label: '34. Total Maryland and local tax amount (line 27 + line 33 if deduction standard)' MD502_LINE_40: label: "40 Total Maryland and local tax withheld" +MD502_AUTHORIZE_DIRECT_DEPOSIT: + label: "Client authorizes the State of Maryland to issue refund by direct deposit (tax refund controller)." +MD502_LINE_51D: + label: "51D Name(s) of Bank Account Holder(s)" MD502B_LINE_1: label: '1 Total number of Regular dependents' MD502B_LINE_2: diff --git a/app/lib/efile/md/md502_calculator.rb b/app/lib/efile/md/md502_calculator.rb index 4625c668fd..efd52d4507 100644 --- a/app/lib/efile/md/md502_calculator.rb +++ b/app/lib/efile/md/md502_calculator.rb @@ -89,6 +89,7 @@ def calculate set_line(:MD502_LINE_34, :calculate_line_34) set_line(:MD502_LINE_40, :calculate_line_40) + set_line(:MD502_AUTHORIZE_DIRECT_DEPOSIT, @intake, :bank_authorization_confirmed_yes?) @md502cr.calculate @lines.transform_values(&:value) diff --git a/app/lib/pdf_filler/md502_pdf.rb b/app/lib/pdf_filler/md502_pdf.rb index fc49a9eccf..d2c9477db5 100644 --- a/app/lib/pdf_filler/md502_pdf.rb +++ b/app/lib/pdf_filler/md502_pdf.rb @@ -15,7 +15,7 @@ def initialize(submission) end def hash_for_pdf - { + answers = { 'Enter 1': @xml_document.at("Form502 Income FederalAdjustedGrossIncome")&.text, 'Enter 1a': @xml_document.at("Form502 Income WagesSalariesAndTips")&.text, 'Enter 1b': @xml_document.at("Form502 Income EarnedIncome")&.text, @@ -86,8 +86,8 @@ def hash_for_pdf 'Enter 3': @xml_document.at('Form502 Additions StateRetirementPickup')&.text, 'Enter 6': @xml_document.at('Form502 Additions Total')&.text, 'Enter 7': @xml_document.at('Form502 Additions FedAGIAndStateAdditions')&.text, - "Enter 15": @xml_document.at('Form502 Subtractions Total')&.text, - "Enter 16": @xml_document.at('Form502 Subtractions StateAdjustedGrossIncome')&.text, + 'Enter 15': @xml_document.at('Form502 Subtractions Total')&.text, + 'Enter 16': @xml_document.at('Form502 Subtractions StateAdjustedGrossIncome')&.text, 'Text Box 30': @xml_document.at('Form502 StateTaxComputation StateIncomeTax')&.text, 'Text Box 36': @xml_document.at('Form502 StateTaxComputation PovertyLevelCredit')&.text, 'Text Box 40': @xml_document.at('Form502 StateTaxComputation TotalCredits')&.text, @@ -99,7 +99,18 @@ def hash_for_pdf 'Text Box 52': @xml_document.at('Form502 LocalTaxComputation TotalCredits')&.text, 'Text Box 54': @xml_document.at('Form502 LocalTaxComputation LocalTaxAfterCredits')&.text, 'Text Box 56': @xml_document.at('Form502 TotalStateAndLocalTax')&.text, + 'Check Box 39': @xml_document.at('Form502 AuthToDirectDepositInd')&.text == 'X' ? 'Yes' : 'Off', + 'Text Box 95': full_names_of_bank_account_holders || "" } + if @xml_document.at('RefundDirectDeposit').present? + answers.merge!({ + 'Check Box 41': @xml_document.at('Checking')&.text == "X" ? 'Yes' : 'Off', + 'Check Box 42': @xml_document.at('Savings')&.text == "X" ? 'Yes' : 'Off', + 'Text Box 93': @xml_document.at('RoutingTransitNumber')&.text, + 'Text Box 94': @xml_document.at('BankAccountNumber')&.text, + }) + end + answers end def spouse_ssn_if_mfs @@ -138,6 +149,24 @@ def generate_codes_for_502_su applicable_codes end + def full_names_of_bank_account_holders + intake = @submission.data_source + return nil unless intake.payment_or_deposit_type.to_sym == :direct_deposit + + if intake.has_joint_account_holder_yes? + account_holder_full_name + " and " + account_holder_full_name(for_joint: true) + else + account_holder_full_name + end + end + + def account_holder_full_name(for_joint: false) + attributes = %w[FirstName MiddleInitial LastName NameSuffix] + account_holder_xmls = @xml_document.css('Form502 NameOnBankAccount') + account_holder_xml = for_joint ? account_holder_xmls[1] : account_holder_xmls[0] + attributes.map { |attr| account_holder_xml.at(attr)&.text }.filter_map(&:presence).join(" ") + end + def calculated_fields @calculated_fields ||= @submission.data_source.tax_calculator.calculate end diff --git a/app/lib/submission_builder/ty2024/states/md/documents/md502.rb b/app/lib/submission_builder/ty2024/states/md/documents/md502.rb index f12cdd739d..492f8952c6 100644 --- a/app/lib/submission_builder/ty2024/states/md/documents/md502.rb +++ b/app/lib/submission_builder/ty2024/states/md/documents/md502.rb @@ -149,6 +149,23 @@ def document end add_element_if_present(xml, "TotalStateAndLocalTax", :MD502_LINE_34) xml.TaxWithheld calculated_fields.fetch(:MD502_LINE_40) + xml.AuthToDirectDepositInd "X" if calculated_fields.fetch(:MD502_AUTHORIZE_DIRECT_DEPOSIT) + if @intake.payment_or_deposit_type.to_sym == :direct_deposit + xml.NameOnBankAccount do + xml.FirstName sanitize_for_xml(@intake.account_holder_first_name) if @intake.account_holder_first_name + xml.MiddleInitial sanitize_for_xml(@intake.account_holder_middle_initial) if @intake.account_holder_middle_initial + xml.LastName sanitize_for_xml(@intake.account_holder_last_name) if @intake.account_holder_last_name + xml.NameSuffix @intake.account_holder_suffix if @intake.account_holder_suffix + end + if @intake.has_joint_account_holder_yes? + xml.NameOnBankAccount do + xml.FirstName sanitize_for_xml(@intake.joint_account_holder_first_name) if @intake.joint_account_holder_first_name + xml.MiddleInitial sanitize_for_xml(@intake.joint_account_holder_middle_initial) if @intake.joint_account_holder_middle_initial + xml.LastName sanitize_for_xml(@intake.joint_account_holder_last_name) if @intake.joint_account_holder_last_name + xml.NameSuffix @intake.joint_account_holder_suffix if @intake.joint_account_holder_suffix + end + end + end xml.DaytimePhoneNumber @direct_file_data.phone_number if @direct_file_data.phone_number.present? end end diff --git a/app/models/state_file_az_intake.rb b/app/models/state_file_az_intake.rb index f38df90f57..04fcb0c66c 100644 --- a/app/models/state_file_az_intake.rb +++ b/app/models/state_file_az_intake.rb @@ -7,7 +7,6 @@ # account_type :integer # armed_forces_member :integer default("unfilled"), not null # armed_forces_wages_amount :decimal(12, 2) -# bank_name :string # charitable_cash_amount :decimal(12, 2) # charitable_contributions :integer default("unfilled"), not null # charitable_noncash_amount :decimal(12, 2) @@ -17,7 +16,6 @@ # current_sign_in_ip :inet # current_step :string # date_electronic_withdrawal :date -# df_data_import_failed_at :datetime # df_data_import_succeeded_at :datetime # df_data_imported_at :datetime # eligibility_529_for_non_qual_expense :integer default("unfilled"), not null @@ -86,7 +84,7 @@ # index_state_file_az_intakes_on_spouse_state_id_id (spouse_state_id_id) # class StateFileAzIntake < StateFileBaseIntake - self.ignored_columns = %w[charitable_cash charitable_noncash household_excise_credit_claimed_amt tribal_wages armed_forces_wages] + self.ignored_columns += %w[charitable_cash charitable_noncash household_excise_credit_claimed_amt tribal_wages armed_forces_wages] encrypts :account_number, :routing_number, :raw_direct_file_data, :raw_direct_file_intake_data has_many :az322_contributions, dependent: :destroy diff --git a/app/models/state_file_base_intake.rb b/app/models/state_file_base_intake.rb index 753e9631d7..dcabec39ca 100644 --- a/app/models/state_file_base_intake.rb +++ b/app/models/state_file_base_intake.rb @@ -1,5 +1,5 @@ class StateFileBaseIntake < ApplicationRecord - self.ignored_columns = [:df_data_import_failed] + self.ignored_columns = [:df_data_import_failed_at, :bank_name] devise :lockable, :timeoutable, :trackable @@ -371,7 +371,6 @@ def self.opted_out_state_file_intakes(email) def sanitize_bank_details if (payment_or_deposit_type || "").to_sym != :direct_deposit self.account_type = "unfilled" - self.bank_name = nil self.routing_number = nil self.account_number = nil self.withdraw_amount = nil diff --git a/app/models/state_file_id_intake.rb b/app/models/state_file_id_intake.rb index cb4c7cc312..b5959ea215 100644 --- a/app/models/state_file_id_intake.rb +++ b/app/models/state_file_id_intake.rb @@ -5,14 +5,12 @@ # id :bigint not null, primary key # account_number :string # account_type :integer default("unfilled"), not null -# bank_name :string # consented_to_terms_and_conditions :integer default("unfilled"), not null # contact_preference :integer default("unfilled"), not null # current_sign_in_at :datetime # current_sign_in_ip :inet # current_step :string # date_electronic_withdrawal :date -# df_data_import_failed_at :datetime # df_data_import_succeeded_at :datetime # df_data_imported_at :datetime # donate_grocery_credit :integer default("unfilled"), not null diff --git a/app/models/state_file_md_intake.rb b/app/models/state_file_md_intake.rb index b195621080..26d613396c 100644 --- a/app/models/state_file_md_intake.rb +++ b/app/models/state_file_md_intake.rb @@ -3,11 +3,14 @@ # Table name: state_file_md_intakes # # id :bigint not null, primary key -# account_holder_name :string +# account_holder_first_name :string +# account_holder_last_name :string +# account_holder_middle_initial :string +# account_holder_suffix :string # account_number :string # account_type :integer default("unfilled"), not null # authorize_sharing_of_health_insurance_info :integer default("unfilled"), not null -# bank_name :string +# bank_authorization_confirmed :integer default("unfilled"), not null # city :string # confirmed_permanent_address :integer default("unfilled"), not null # consented_to_terms_and_conditions :integer default("unfilled"), not null @@ -16,7 +19,6 @@ # current_sign_in_ip :inet # current_step :string # date_electronic_withdrawal :date -# df_data_import_failed_at :datetime # df_data_import_succeeded_at :datetime # df_data_imported_at :datetime # eligibility_filing_status_mfj :integer default("unfilled"), not null @@ -30,7 +32,12 @@ # failed_attempts :integer default(0), not null # federal_return_status :string # had_hh_member_without_health_insurance :integer default("unfilled"), not null +# has_joint_account_holder :integer default("unfilled"), not null # hashed_ssn :string +# joint_account_holder_first_name :string +# joint_account_holder_last_name :string +# joint_account_holder_middle_initial :string +# joint_account_holder_suffix :string # last_sign_in_at :datetime # last_sign_in_ip :inet # locale :string default("en") @@ -111,6 +118,8 @@ class StateFileMdIntake < StateFileBaseIntake enum authorize_sharing_of_health_insurance_info: { unfilled: 0, yes: 1, no: 2}, _prefix: :authorize_sharing_of_health_insurance_info enum primary_did_not_have_health_insurance: { unfilled: 0, yes: 1, no: 2}, _prefix: :primary_did_not_have_health_insurance enum spouse_did_not_have_health_insurance: { unfilled: 0, yes: 1, no: 2}, _prefix: :spouse_did_not_have_health_insurance + enum bank_authorization_confirmed: { unfilled: 0, yes: 1, no: 2 }, _prefix: :bank_authorization_confirmed + enum has_joint_account_holder: { unfilled: 0, yes: 1, no: 2 }, _prefix: :has_joint_account_holder def disqualifying_df_data_reason w2_states = direct_file_data.parsed_xml.css('W2StateLocalTaxGrp W2StateTaxGrp StateAbbreviationCd') @@ -140,12 +149,20 @@ def calculate_age(dob, inclusive_of_jan_1) def sanitize_bank_details if (payment_or_deposit_type || "").to_sym != :direct_deposit self.account_type = "unfilled" - self.bank_name = nil self.routing_number = nil self.account_number = nil self.withdraw_amount = nil self.date_electronic_withdrawal = nil - self.account_holder_name = nil + self.account_holder_first_name = nil + self.account_holder_middle_initial = nil + self.account_holder_last_name = nil + self.account_holder_suffix = nil + self.joint_account_holder_first_name = nil + self.joint_account_holder_middle_initial = nil + self.joint_account_holder_last_name = nil + self.joint_account_holder_suffix = nil + self.has_joint_account_holder = "unfilled" + self.bank_authorization_confirmed = "unfilled" end end diff --git a/app/models/state_file_nc_intake.rb b/app/models/state_file_nc_intake.rb index 5b4e384609..b4cbb774a7 100644 --- a/app/models/state_file_nc_intake.rb +++ b/app/models/state_file_nc_intake.rb @@ -5,7 +5,6 @@ # id :bigint not null, primary key # account_number :string # account_type :integer default("unfilled"), not null -# bank_name :string # city :string # consented_to_terms_and_conditions :integer default("unfilled"), not null # contact_preference :integer default("unfilled"), not null @@ -13,7 +12,6 @@ # current_sign_in_ip :inet # current_step :string # date_electronic_withdrawal :date -# df_data_import_failed_at :datetime # df_data_import_succeeded_at :datetime # df_data_imported_at :datetime # eligibility_lived_in_state :integer default("unfilled"), not null diff --git a/app/models/state_file_nj_intake.rb b/app/models/state_file_nj_intake.rb index 38fe81933e..e0c3671c88 100644 --- a/app/models/state_file_nj_intake.rb +++ b/app/models/state_file_nj_intake.rb @@ -5,7 +5,6 @@ # id :bigint not null, primary key # account_number :string # account_type :integer default("unfilled"), not null -# bank_name :string # claimed_as_dep :integer # claimed_as_eitc_qualifying_child :integer default("unfilled"), not null # consented_to_terms_and_conditions :integer default("unfilled"), not null @@ -15,7 +14,6 @@ # current_sign_in_ip :inet # current_step :string # date_electronic_withdrawal :date -# df_data_import_failed_at :datetime # df_data_import_succeeded_at :datetime # df_data_imported_at :datetime # eligibility_all_members_health_insurance :integer default("unfilled"), not null diff --git a/app/models/state_file_ny_intake.rb b/app/models/state_file_ny_intake.rb index a0303a7264..aa81fec1a1 100644 --- a/app/models/state_file_ny_intake.rb +++ b/app/models/state_file_ny_intake.rb @@ -5,7 +5,6 @@ # id :bigint not null, primary key # account_number :string # account_type :integer default("unfilled"), not null -# bank_name :string # confirmed_permanent_address :integer default("unfilled"), not null # confirmed_third_party_designee :integer default("unfilled"), not null # consented_to_terms_and_conditions :integer default("unfilled"), not null @@ -14,7 +13,6 @@ # current_sign_in_ip :inet # current_step :string # date_electronic_withdrawal :date -# df_data_import_failed_at :datetime # df_data_import_succeeded_at :datetime # df_data_imported_at :datetime # eligibility_lived_in_state :integer default("unfilled"), not null diff --git a/app/views/state_file/questions/md_tax_refund/_md_bank_details.html.erb b/app/views/state_file/questions/md_tax_refund/_md_bank_details.html.erb index 3751516391..41b4ba2b79 100644 --- a/app/views/state_file/questions/md_tax_refund/_md_bank_details.html.erb +++ b/app/views/state_file/questions/md_tax_refund/_md_bank_details.html.erb @@ -24,23 +24,47 @@ <% end %> <% end %> - <%= form.cfa_input_field(:bank_name, t("views.questions.bank_details.bank_name"), classes: ["form-width--long"]) %> +

<%= t('.bank_account_type') %>

<%= form.cfa_radio_set( :account_type, - label_text: t("views.questions.bank_details.account_type.label"), collection: [ { value: :checking, label: t("views.questions.bank_details.account_type.checking") }, { value: :savings, label: t("views.questions.bank_details.account_type.savings") }, ] ) %> - <%= form.cfa_input_field(:account_holder_name, t(".account_holder_name"), classes: ["form-width--long"]) %> +
+
+ <%= form.cfa_checkbox(:has_joint_account_holder, t(".check_if_joint_account"), options: { checked_value: "yes", unchecked_value: "no", "data-follow-up": "#joint-account-holder-questions" }) %> +
+

<%= t(".account_holder_name") %>

+ <%= form.cfa_input_field :account_holder_first_name, t("general.first_name"), classes: ["form-width--long"] %> + <%= form.cfa_input_field :account_holder_middle_initial, t(".middle_initial"), classes: ["form-width--long"] %> + <%= form.cfa_input_field :account_holder_last_name, t(".last_name"), classes: ["form-width--long"] %> + <%= form.vita_min_state_file_select( + :account_holder_suffix, + t(".suffix"), + suffix_options_for_state_select, + prompt: t('general.select_prompt'), include_blank: true) %> +
+

<%= t('.joint_account_holder_name') %>

+ <%= form.cfa_input_field :joint_account_holder_first_name, t("general.first_name"), classes: ["form-width--long"] %> + <%= form.cfa_input_field :joint_account_holder_middle_initial, t(".middle_initial"), classes: ["form-width--long"] %> + <%= form.cfa_input_field :joint_account_holder_last_name, t(".last_name"), classes: ["form-width--long"] %> + <%= form.vita_min_state_file_select( + :joint_account_holder_suffix, + t(".suffix"), + suffix_options_for_state_select, + prompt: t('general.select_prompt'), include_blank: true) %> +
+
+

<%= t('.bank_account_details') %>

<%= form.cfa_input_field(:routing_number, t("state_file.questions.tax_refund.bank_details.routing_number"), classes: ["form-width--long", "disablecopy"]) %> <%= form.cfa_input_field(:routing_number_confirmation, t("state_file.questions.tax_refund.bank_details.confirm_routing_number"), classes: ["form-width--long", "disablepaste", "disablecopy"]) %> <%= form.cfa_input_field(:account_number, t("state_file.questions.tax_refund.bank_details.account_number"), classes: ["form-width--long", "disablecopy"]) %> <%= form.cfa_input_field(:account_number_confirmation, t("state_file.questions.tax_refund.bank_details.confirm_account_number"), classes: ["form-width--long", "disablepaste", "disablecopy"]) %> -

<%= t("state_file.questions.tax_refund.bank_details.disclaimer") %>

+ <%= form.cfa_checkbox(:bank_authorization_confirmed, t(".bank_authorization_confirmation"), options: { checked_value: "yes", unchecked_value: "no" }) %> <% if owe_taxes && !before_withdrawal_date_deadline?(current_state_code) %>

<%= t("state_file.questions.tax_refund.bank_details.after_deadline_default_withdrawal_info", diff --git a/app/views/state_file/questions/tax_refund/_bank_details.html.erb b/app/views/state_file/questions/tax_refund/_bank_details.html.erb index f8567b9b07..a08d9e8d83 100644 --- a/app/views/state_file/questions/tax_refund/_bank_details.html.erb +++ b/app/views/state_file/questions/tax_refund/_bank_details.html.erb @@ -24,7 +24,6 @@ <% end %> <% end %> - <%= form.cfa_input_field(:bank_name, t("views.questions.bank_details.bank_name"), classes: ["form-width--long"]) %> <%= form.cfa_radio_set( :account_type, label_text: t("views.questions.bank_details.account_type.label"), diff --git a/config/locales/en.yml b/config/locales/en.yml index 942f9d5920..42661299d4 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -171,7 +171,7 @@ en: format: Please enter an expiration date in the format MM-DD-2YYY. first_name: blank: Please enter a first name. - invalid_format: Only letters, hyphen, and apostrophe are accepted, and first name must be less than 16 characters. + invalid_format: Only letters, numbers, hyphen, and apostrophe are accepted, and first name must be less than 16 characters. hoh_qualifying_person_name: blank: Please double check your answers regarding how many months you lived with these dependents. Based on your federal return, you lived in a home with one of these dependents for at least half the year. intake_site: @@ -180,7 +180,7 @@ en: blank: Please select a number of jobs. last_name: blank: Please enter a last name. - invalid_format: Only letters, hyphen, and apostrophe are accepted. + invalid_format: Only letters, numbers, hyphen, and apostrophe are accepted, and last name must be less than 32 characters. password: insecure: Add some more uncommon words to improve password strength. not_matching: The password provided does not match. @@ -2760,6 +2760,15 @@ en: md_tax_refund: md_bank_details: account_holder_name: Account Holder Name + bank_account_details: Bank Account Details + bank_account_type: Bank Account Type + bank_authorization_confirmation: Check here to confirm you authorize the State of Maryland to issue your refund by direct deposit. + bank_authorization_confirmation_error: Please confirm authorization or select pay by mail + check_if_joint_account: Check here if you have a joint account + joint_account_holder_name: Joint Account Holder Name + last_name: Last Name + middle_initial: Middle Initial + suffix: Suffix md_two_income_subtractions: edit: description: In order to know if you qualify and calculate the subtraction, we need more information about the student loan interest deduction you took on your federal tax return. diff --git a/config/locales/es.yml b/config/locales/es.yml index d3a03c7503..54a2846a51 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -172,7 +172,7 @@ es: format: Ingrese una fecha de vencimiento en el formato MM-DD-2YYY. first_name: blank: Por favor, ingrese un nombre. - invalid_format: Solo se aceptan letras, guiones y apóstrofos, y el nombre debe tener menos de 16 caracteres. + invalid_format: Solo se aceptan letras, números, guiones y apóstrofos, y el nombre debe tener menos de 16 caracteres. hoh_qualifying_person_name: blank: Por favor, revisa tus respuestas sobre cuántos meses viviste con estos dependientes. Según tu declaración federal, viviste en un hogar con al menos uno de estos dependientes durante al menos la mitad del año. intake_site: @@ -181,7 +181,7 @@ es: blank: Por favor, seleccione un número de trabajos. last_name: blank: Por favor, ingrese un apellido. - invalid_format: Solo se aceptan letras, guiones y apóstrofos. + invalid_format: Solo se aceptan letras, números, guiones y apóstrofos, y el nombre debe tener menos de 32 caracteres. password: insecure: Agregue algunas palabras más poco comunes para mejorar la seguridad de la contraseña. not_matching: Las contraseñas proporcionadas no coinciden. @@ -2732,6 +2732,15 @@ es: md_tax_refund: md_bank_details: account_holder_name: Nombre del titular de la cuenta + bank_account_details: Detalles de la cuenta bancaria + bank_account_type: Tipo de cuenta bancaria + bank_authorization_confirmation: Marque aquí para confirmar que autoriza al estado de Maryland a emitir su reembolso mediante depósito directo. + bank_authorization_confirmation_error: Por favor confirme la autorización o seleccione pagar por correo + check_if_joint_account: Marque aquí si tiene una cuenta conjunta + joint_account_holder_name: Nombre del titular de la cuenta conjunta + last_name: Apellido + middle_initial: Inicial del segundo nombre + suffix: Sufijo md_two_income_subtractions: edit: description: Para saber si califica y calcular la deducción, necesitamos más información sobre la deducción de intereses de préstamos estudiantiles que tomó en su declaración de impuestos federales. diff --git a/db/migrate/20241118234711_add_direct_deposit_authorization_to_state_file_md_intake.rb b/db/migrate/20241118234711_add_direct_deposit_authorization_to_state_file_md_intake.rb new file mode 100644 index 0000000000..a487f62848 --- /dev/null +++ b/db/migrate/20241118234711_add_direct_deposit_authorization_to_state_file_md_intake.rb @@ -0,0 +1,5 @@ +class AddDirectDepositAuthorizationToStateFileMdIntake < ActiveRecord::Migration[7.1] + def change + add_column :state_file_md_intakes, :bank_authorization_confirmed, :integer, default: 0, null: false + end +end diff --git a/db/migrate/20241121222604_add_joint_account_holder_name_and_account_holder_deconstructed_fields.rb b/db/migrate/20241121222604_add_joint_account_holder_name_and_account_holder_deconstructed_fields.rb new file mode 100644 index 0000000000..8e3345e6f8 --- /dev/null +++ b/db/migrate/20241121222604_add_joint_account_holder_name_and_account_holder_deconstructed_fields.rb @@ -0,0 +1,14 @@ +class AddJointAccountHolderNameAndAccountHolderDeconstructedFields < ActiveRecord::Migration[7.1] + def change + add_column :state_file_md_intakes, :has_joint_account_holder, :integer, default: 0, null: false + add_column :state_file_md_intakes, :joint_account_holder_first_name, :string + add_column :state_file_md_intakes, :joint_account_holder_last_name, :string + add_column :state_file_md_intakes, :joint_account_holder_middle_initial, :string + add_column :state_file_md_intakes, :joint_account_holder_suffix, :string + + add_column :state_file_md_intakes, :account_holder_first_name, :string + add_column :state_file_md_intakes, :account_holder_last_name, :string + add_column :state_file_md_intakes, :account_holder_middle_initial, :string + add_column :state_file_md_intakes, :account_holder_suffix, :string + end +end diff --git a/db/migrate/20241127213848_drop_account_holder_name_from_state_file_md_intakes.rb b/db/migrate/20241127213848_drop_account_holder_name_from_state_file_md_intakes.rb new file mode 100644 index 0000000000..9ee1745649 --- /dev/null +++ b/db/migrate/20241127213848_drop_account_holder_name_from_state_file_md_intakes.rb @@ -0,0 +1,7 @@ +class DropAccountHolderNameFromStateFileMdIntakes < ActiveRecord::Migration[7.1] + def change + safety_assured do + remove_column :state_file_md_intakes, :account_holder_name + end + end +end diff --git a/db/schema.rb b/db/schema.rb index baba740951..fec67aaf2e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.1].define(version: 2024_11_21_162009) do +ActiveRecord::Schema[7.1].define(version: 2024_11_27_213848) do # These are extensions that must be enabled in order to support this database enable_extension "citext" enable_extension "plpgsql" @@ -1895,10 +1895,14 @@ end create_table "state_file_md_intakes", force: :cascade do |t| - t.string "account_holder_name" + t.string "account_holder_first_name" + t.string "account_holder_last_name" + t.string "account_holder_middle_initial" + t.string "account_holder_suffix" t.string "account_number" t.integer "account_type", default: 0, null: false t.integer "authorize_sharing_of_health_insurance_info", default: 0, null: false + t.integer "bank_authorization_confirmed", default: 0, null: false t.string "bank_name" t.string "city" t.integer "confirmed_permanent_address", default: 0, null: false @@ -1924,7 +1928,12 @@ t.string "federal_return_status" t.string "federal_submission_id" t.integer "had_hh_member_without_health_insurance", default: 0, null: false + t.integer "has_joint_account_holder", default: 0, null: false t.string "hashed_ssn" + t.string "joint_account_holder_first_name" + t.string "joint_account_holder_last_name" + t.string "joint_account_holder_middle_initial" + t.string "joint_account_holder_suffix" t.datetime "last_sign_in_at" t.inet "last_sign_in_ip" t.string "locale", default: "en" diff --git a/spec/controllers/state_file/questions/md_tax_refund_controller_spec.rb b/spec/controllers/state_file/questions/md_tax_refund_controller_spec.rb index 9f3ff9035e..e7c88538be 100644 --- a/spec/controllers/state_file/questions/md_tax_refund_controller_spec.rb +++ b/spec/controllers/state_file/questions/md_tax_refund_controller_spec.rb @@ -13,7 +13,7 @@ get :edit expect(response).to be_successful expect(response_html).to have_text "Good news" - expect(response_html).to have_text "Bank name" + expect(response_html).to have_text "Account Holder Name" end end end diff --git a/spec/controllers/state_file/questions/tax_refund_controller_spec.rb b/spec/controllers/state_file/questions/tax_refund_controller_spec.rb index 5ed93f6cca..dabc7cfe95 100644 --- a/spec/controllers/state_file/questions/tax_refund_controller_spec.rb +++ b/spec/controllers/state_file/questions/tax_refund_controller_spec.rb @@ -13,7 +13,7 @@ get :edit expect(response).to be_successful expect(response_html).to have_text "Good news" - expect(response_html).to have_text "Bank name" + expect(response_html).to have_text "Routing Number" end end end diff --git a/spec/controllers/state_file/questions/taxes_owed_controller_spec.rb b/spec/controllers/state_file/questions/taxes_owed_controller_spec.rb index 99765c0af9..4990a763bf 100644 --- a/spec/controllers/state_file/questions/taxes_owed_controller_spec.rb +++ b/spec/controllers/state_file/questions/taxes_owed_controller_spec.rb @@ -13,7 +13,7 @@ get :edit expect(response).to be_successful expect(response_html).to have_text "You owe" - expect(response_html).to have_text "Bank name" + expect(response_html).to have_text "Routing Number" end end end diff --git a/spec/factories/state_file/personas/2023/az.rb b/spec/factories/state_file/personas/az.rb similarity index 98% rename from spec/factories/state_file/personas/2023/az.rb rename to spec/factories/state_file/personas/az.rb index bdc7baa6c8..55766149c4 100644 --- a/spec/factories/state_file/personas/2023/az.rb +++ b/spec/factories/state_file/personas/az.rb @@ -94,7 +94,6 @@ } payment_or_deposit_type { "direct_deposit" } - bank_name { "Canvas Credit union" } account_type { "checking" } routing_number { "302075830" } account_number { "123456" } @@ -203,7 +202,6 @@ charitable_noncash_amount { 100 } payment_or_deposit_type { "direct_deposit" } - bank_name { "canvas credit union" } account_type { "savings" } routing_number { "302075830" } account_number { "123456" } diff --git a/spec/factories/state_file/personas/2023/ny.rb b/spec/factories/state_file/personas/ny.rb similarity index 98% rename from spec/factories/state_file/personas/2023/ny.rb rename to spec/factories/state_file/personas/ny.rb index 4af81074ff..861248f9ad 100644 --- a/spec/factories/state_file/personas/2023/ny.rb +++ b/spec/factories/state_file/personas/ny.rb @@ -43,7 +43,6 @@ end payment_or_deposit_type { "direct_deposit" } - bank_name { "FYST Bank" } account_type { "checking" } routing_number { "011001742" } account_number { "99990000001011" } diff --git a/spec/factories/state_file_az_intakes.rb b/spec/factories/state_file_az_intakes.rb index c0882addc2..be089c3301 100644 --- a/spec/factories/state_file_az_intakes.rb +++ b/spec/factories/state_file_az_intakes.rb @@ -7,7 +7,6 @@ # account_type :integer # armed_forces_member :integer default("unfilled"), not null # armed_forces_wages_amount :decimal(12, 2) -# bank_name :string # charitable_cash_amount :decimal(12, 2) # charitable_contributions :integer default("unfilled"), not null # charitable_noncash_amount :decimal(12, 2) @@ -17,7 +16,6 @@ # current_sign_in_ip :inet # current_step :string # date_electronic_withdrawal :date -# df_data_import_failed_at :datetime # df_data_import_succeeded_at :datetime # df_data_imported_at :datetime # eligibility_529_for_non_qual_expense :integer default("unfilled"), not null diff --git a/spec/factories/state_file_id_intakes.rb b/spec/factories/state_file_id_intakes.rb index 7d41af82df..9f7eca879c 100644 --- a/spec/factories/state_file_id_intakes.rb +++ b/spec/factories/state_file_id_intakes.rb @@ -5,14 +5,12 @@ # id :bigint not null, primary key # account_number :string # account_type :integer default("unfilled"), not null -# bank_name :string # consented_to_terms_and_conditions :integer default("unfilled"), not null # contact_preference :integer default("unfilled"), not null # current_sign_in_at :datetime # current_sign_in_ip :inet # current_step :string # date_electronic_withdrawal :date -# df_data_import_failed_at :datetime # df_data_import_succeeded_at :datetime # df_data_imported_at :datetime # donate_grocery_credit :integer default("unfilled"), not null diff --git a/spec/factories/state_file_md_intakes.rb b/spec/factories/state_file_md_intakes.rb index 1f74d9fc7d..78efcabe9e 100644 --- a/spec/factories/state_file_md_intakes.rb +++ b/spec/factories/state_file_md_intakes.rb @@ -3,11 +3,14 @@ # Table name: state_file_md_intakes # # id :bigint not null, primary key -# account_holder_name :string +# account_holder_first_name :string +# account_holder_last_name :string +# account_holder_middle_initial :string +# account_holder_suffix :string # account_number :string # account_type :integer default("unfilled"), not null # authorize_sharing_of_health_insurance_info :integer default("unfilled"), not null -# bank_name :string +# bank_authorization_confirmed :integer default("unfilled"), not null # city :string # confirmed_permanent_address :integer default("unfilled"), not null # consented_to_terms_and_conditions :integer default("unfilled"), not null @@ -16,7 +19,6 @@ # current_sign_in_ip :inet # current_step :string # date_electronic_withdrawal :date -# df_data_import_failed_at :datetime # df_data_import_succeeded_at :datetime # df_data_imported_at :datetime # eligibility_filing_status_mfj :integer default("unfilled"), not null @@ -30,7 +32,12 @@ # failed_attempts :integer default(0), not null # federal_return_status :string # had_hh_member_without_health_insurance :integer default("unfilled"), not null +# has_joint_account_holder :integer default("unfilled"), not null # hashed_ssn :string +# joint_account_holder_first_name :string +# joint_account_holder_last_name :string +# joint_account_holder_middle_initial :string +# joint_account_holder_suffix :string # last_sign_in_at :datetime # last_sign_in_ip :inet # locale :string default("en") diff --git a/spec/factories/state_file_nc_intakes.rb b/spec/factories/state_file_nc_intakes.rb index cd1705c034..8709430027 100644 --- a/spec/factories/state_file_nc_intakes.rb +++ b/spec/factories/state_file_nc_intakes.rb @@ -5,7 +5,6 @@ # id :bigint not null, primary key # account_number :string # account_type :integer default("unfilled"), not null -# bank_name :string # city :string # consented_to_terms_and_conditions :integer default("unfilled"), not null # contact_preference :integer default("unfilled"), not null @@ -13,7 +12,6 @@ # current_sign_in_ip :inet # current_step :string # date_electronic_withdrawal :date -# df_data_import_failed_at :datetime # df_data_import_succeeded_at :datetime # df_data_imported_at :datetime # eligibility_lived_in_state :integer default("unfilled"), not null diff --git a/spec/factories/state_file_nj_intakes.rb b/spec/factories/state_file_nj_intakes.rb index f3f5c81963..35e2c49fe2 100644 --- a/spec/factories/state_file_nj_intakes.rb +++ b/spec/factories/state_file_nj_intakes.rb @@ -5,7 +5,6 @@ # id :bigint not null, primary key # account_number :string # account_type :integer default("unfilled"), not null -# bank_name :string # claimed_as_dep :integer # claimed_as_eitc_qualifying_child :integer default("unfilled"), not null # consented_to_terms_and_conditions :integer default("unfilled"), not null @@ -15,7 +14,6 @@ # current_sign_in_ip :inet # current_step :string # date_electronic_withdrawal :date -# df_data_import_failed_at :datetime # df_data_import_succeeded_at :datetime # df_data_imported_at :datetime # eligibility_all_members_health_insurance :integer default("unfilled"), not null diff --git a/spec/factories/state_file_ny_intakes.rb b/spec/factories/state_file_ny_intakes.rb index e568b04fcb..d6bf396309 100644 --- a/spec/factories/state_file_ny_intakes.rb +++ b/spec/factories/state_file_ny_intakes.rb @@ -5,7 +5,6 @@ # id :bigint not null, primary key # account_number :string # account_type :integer default("unfilled"), not null -# bank_name :string # confirmed_permanent_address :integer default("unfilled"), not null # confirmed_third_party_designee :integer default("unfilled"), not null # consented_to_terms_and_conditions :integer default("unfilled"), not null @@ -14,7 +13,6 @@ # current_sign_in_ip :inet # current_step :string # date_electronic_withdrawal :date -# df_data_import_failed_at :datetime # df_data_import_succeeded_at :datetime # df_data_imported_at :datetime # eligibility_lived_in_state :integer default("unfilled"), not null diff --git a/spec/features/state_file/complete_intake_spec.rb b/spec/features/state_file/complete_intake_spec.rb index 7719b297bb..b1c1508d3f 100644 --- a/spec/features/state_file/complete_intake_spec.rb +++ b/spec/features/state_file/complete_intake_spec.rb @@ -287,7 +287,6 @@ choose I18n.t("state_file.questions.tax_refund.edit.direct_deposit") expect(page).to have_text I18n.t("state_file.questions.tax_refund.bank_details.bank_title") - fill_in "state_file_tax_refund_form_bank_name", with: "bank name" choose "Checking" fill_in "state_file_tax_refund_form_routing_number", with: "019456124" fill_in "state_file_tax_refund_form_routing_number_confirmation", with: "019456124" @@ -521,6 +520,7 @@ before do # TODO: replace fixture used here with one that has all the characteristics we want to test allow_any_instance_of(DirectFileData).to receive(:fed_unemployment).and_return 100 + allow_any_instance_of(Efile::Md::Md502Calculator).to receive(:refund_or_owed_amount).and_return 1000 end it "has content", required_schema: "md" do @@ -596,6 +596,22 @@ choose I18n.t("general.negative") click_on I18n.t("general.continue") + expect(strip_html_tags(page.body)).to have_text strip_html_tags(I18n.t("state_file.questions.tax_refund.edit.title_html", state_name: "Maryland", refund_amount: 1000)) + choose I18n.t('state_file.questions.tax_refund.edit.direct_deposit') + choose I18n.t("views.questions.bank_details.account_type.checking") + check "Check here if you have a joint account" + fill_in 'state_file_md_tax_refund_form_account_holder_first_name', with: "Zeus" + fill_in 'state_file_md_tax_refund_form_account_holder_middle_initial', with: "A" + fill_in 'state_file_md_tax_refund_form_account_holder_last_name', with: "Thunder" + fill_in 'state_file_md_tax_refund_form_joint_account_holder_first_name', with: "Hera" + fill_in 'state_file_md_tax_refund_form_joint_account_holder_last_name', with: "Thunder" + fill_in 'state_file_md_tax_refund_form_routing_number', with: "019456124" + fill_in 'state_file_md_tax_refund_form_routing_number_confirmation', with: "019456124" + fill_in 'state_file_md_tax_refund_form_account_number', with: "123456789" + fill_in 'state_file_md_tax_refund_form_account_number_confirmation', with: "123456789" + check I18n.t('state_file.questions.md_tax_refund.md_bank_details.bank_authorization_confirmation') + click_on I18n.t("general.continue") + expect(page).to have_text I18n.t("state_file.questions.esign_declaration.edit.title", state_name: "Maryland") fill_in 'state_file_esign_declaration_form_primary_signature_pin', with: "12345" fill_in 'state_file_esign_declaration_form_spouse_signature_pin', with: "54321" diff --git a/spec/forms/state_file/md_tax_refund_form_spec.rb b/spec/forms/state_file/md_tax_refund_form_spec.rb index 792006ab6c..b61a173121 100644 --- a/spec/forms/state_file/md_tax_refund_form_spec.rb +++ b/spec/forms/state_file/md_tax_refund_form_spec.rb @@ -11,8 +11,11 @@ account_number: "12345", account_number_confirmation: "12345", account_type: "checking", - bank_name: "Bank official", - account_holder_name: "Geddy Lee" + account_holder_first_name: "Geddy", + account_holder_middle_initial: "J", + account_holder_last_name: "Lee", + account_holder_suffix: "JR", + bank_authorization_confirmed: "yes", } end @@ -28,8 +31,10 @@ expect(intake.account_type).to eq "unfilled" expect(intake.account_number).to be_nil expect(intake.routing_number).to be_nil - expect(intake.bank_name).to be_nil - expect(intake.account_holder_name).to be_nil + expect(intake.account_holder_first_name).to be_nil + expect(intake.account_holder_middle_initial).to be_nil + expect(intake.account_holder_last_name).to be_nil + expect(intake.account_holder_suffix).to be_nil end end @@ -48,8 +53,10 @@ expect(intake.account_type).to eq "checking" expect(intake.routing_number).to eq "019456124" expect(intake.account_number).to eq "12345" - expect(intake.bank_name).to eq "Bank official" - expect(intake.account_holder_name).to eq "Geddy Lee" + expect(intake.account_holder_first_name).to eq "Geddy" + expect(intake.account_holder_middle_initial).to eq "J" + expect(intake.account_holder_last_name).to eq "Lee" + expect(intake.account_holder_suffix).to eq "JR" end end @@ -61,8 +68,16 @@ routing_number: "019456124", account_number: "12345", account_type: "checking", - bank_name: "Bank official", - account_holder_name: "Laney Knope" + account_holder_first_name: "Laney", + account_holder_middle_initial: "", + account_holder_last_name: "Knope", + account_holder_suffix: "", + joint_account_holder_first_name: "Janey", + joint_account_holder_middle_initial: "", + joint_account_holder_last_name: "Knope", + joint_account_holder_suffix: "", + has_joint_account_holder: 'yes', + bank_authorization_confirmed: "yes", ) end @@ -76,8 +91,15 @@ expect(intake.account_type).to eq "unfilled" expect(intake.account_number).to be_nil expect(intake.routing_number).to be_nil - expect(intake.bank_name).to be_nil - expect(intake.account_holder_name).to be_nil + expect(intake.account_holder_first_name).to be_nil + expect(intake.account_holder_middle_initial).to be_nil + expect(intake.account_holder_last_name).to be_nil + expect(intake.account_holder_suffix).to be_nil + expect(intake.account_holder_first_name).to be_nil + expect(intake.account_holder_middle_initial).to be_nil + expect(intake.account_holder_last_name).to be_nil + expect(intake.account_holder_suffix).to be_nil + expect(intake.bank_authorization_confirmed).to eq "unfilled" end end end @@ -89,8 +111,16 @@ let(:account_number) { "12345" } let(:account_number_confirmation) { "12345" } let(:account_type) { "checking" } - let(:bank_name) { "Bank official" } - let(:account_holder_name) { "Laney Knope" } + let(:account_holder_first_name) { "Laney" } + let(:account_holder_middle_initial) { "K" } + let(:account_holder_last_name) { "Knope" } + let(:account_holder_suffix) { "II" } + let(:joint_account_holder_first_name) { "" } + let(:joint_account_holder_middle_initial) { "" } + let(:joint_account_holder_last_name) { "" } + let(:joint_account_holder_suffix) { "" } + let(:has_joint_account_holder) { "no" } + let(:bank_authorization_confirmed) { "yes" } let(:params) do { @@ -100,8 +130,16 @@ account_number: account_number, account_number_confirmation: account_number_confirmation, account_type: account_type, - bank_name: bank_name, - account_holder_name: account_holder_name + account_holder_first_name: account_holder_first_name, + account_holder_middle_initial: account_holder_middle_initial, + account_holder_last_name: account_holder_last_name, + account_holder_suffix: account_holder_suffix, + has_joint_account_holder: has_joint_account_holder, + joint_account_holder_first_name: joint_account_holder_first_name, + joint_account_holder_middle_initial: joint_account_holder_middle_initial, + joint_account_holder_last_name: joint_account_holder_last_name, + joint_account_holder_suffix: joint_account_holder_suffix, + bank_authorization_confirmed: bank_authorization_confirmed, } end @@ -114,7 +152,21 @@ end end + context "bank_authorization_confirmed" do + context "if 'no' param passed in" do + let(:bank_authorization_confirmed) { "no" } + + it "invalid" do + form = described_class.new(intake, params) + expect(form).not_to be_valid + expect(form.errors).to include :bank_authorization_confirmed + end + end + end + context "when the payment_or_deposit_type is direct_deposit" do + let(:payment_or_deposit_type) { "direct_deposit" } + context "all other params present" do it "is valid" do form = described_class.new(intake, params) @@ -122,12 +174,105 @@ end end + context "with numbers in first and last names" do + let(:account_holder_first_name) { "A'1" } + let(:account_holder_last_name) { "2A G" } + let(:joint_account_holder_first_name) { "1-B" } + let(:joint_account_holder_last_name) { "B1" } + let(:joint_has_joint_account_holder) { "yes" } + + it "is valid" do + form = described_class.new(intake, params) + expect(form).to be_valid + end + end + context "missing account holder name" do - let(:account_holder_name) { nil } + let(:account_holder_first_name) { nil } + let(:account_holder_last_name) { nil } it "is not valid" do form = described_class.new(intake, params) expect(form).not_to be_valid - expect(form.errors).to include :account_holder_name + expect(form.errors).to include :account_holder_first_name + expect(form.errors).to include :account_holder_last_name + end + end + + context "has invalid account_holder params" do + let(:account_holder_first_name) { "A12345678_101112131415A1234567891" } + let(:account_holder_middle_initial) { 'AB' } + let(:account_holder_last_name) { "B'23%9" } + let(:account_holder_suffix) { "SH" } + + it "is invalid" do + form = described_class.new(intake, params) + expect(form).not_to be_valid + expect(form.errors[:account_holder_first_name]).to include("Only letters, numbers, hyphen, and apostrophe are accepted, and first name must be less than 16 characters.") + expect(form.errors[:account_holder_middle_initial]).to include("is too long (maximum is 1 character)") + expect(form.errors[:account_holder_last_name]).to include("Only letters, numbers, hyphen, and apostrophe are accepted, and last name must be less than 32 characters.") + expect(form.errors[:account_holder_suffix]).to include("is not included in the list") + end + end + + context "missing joint account holder name" do + let(:joint_account_holder_first_name) { nil } + let(:joint_account_holder_last_name) { nil } + + context "when client did not indicate has_joint_account_holder" do + it "is valid" do + form = described_class.new(intake, params) + expect(form).to be_valid + expect(form.errors).to be_empty + end + end + + context "when client did indicate has_joint_account_holder" do + let(:has_joint_account_holder) { 'yes' } + + context "has valid params" do + let(:joint_account_holder_first_name) { "ABCD EFGH-JKLM" } + let(:joint_account_holder_middle_initial) { "Z" } + let(:joint_account_holder_last_name) { "B'ONEIL" } + let(:joint_account_holder_suffix) { "VII" } + + it "is valid" do + form = described_class.new(intake, params) + expect(form).to be_valid + expect(form.errors).to be_empty + end + end + + context "has invalid params" do + let(:joint_account_holder_first_name) { "A12345678910(112131415A1234567891" } + let(:joint_account_holder_middle_initial) { 'AB' } + let(:joint_account_holder_last_name) { "B'23%9" } + let(:joint_account_holder_suffix) { "SH" } + + it "is invalid" do + form = described_class.new(intake, params) + expect(form).not_to be_valid + expect(form.errors[:joint_account_holder_first_name]).to include("Only letters, numbers, hyphen, and apostrophe are accepted, and first name must be less than 16 characters.") + expect(form.errors[:joint_account_holder_middle_initial]).to include("is too long (maximum is 1 character)") + expect(form.errors[:joint_account_holder_last_name]).to include("Only letters, numbers, hyphen, and apostrophe are accepted, and last name must be less than 32 characters.") + expect(form.errors[:joint_account_holder_suffix]).to include("is not included in the list") + end + end + + context "has missing params" do + let(:joint_account_holder_first_name) { nil } + let(:joint_account_holder_middle_initial) { nil } + let(:joint_account_holder_last_name) { nil } + let(:joint_account_holder_suffix) { nil } + + it "is invalid" do + form = described_class.new(intake, params) + expect(form).not_to be_valid + expect(form.errors[:joint_account_holder_first_name]).to include("Can't be blank.") + expect(form.errors[:joint_account_holder_middle_initial]).to be_empty + expect(form.errors[:joint_account_holder_last_name]).to include("Can't be blank.") + expect(form.errors[:joint_account_holder_suffix]).to be_empty + end + end end end diff --git a/spec/forms/state_file/tax_refund_form_spec.rb b/spec/forms/state_file/tax_refund_form_spec.rb index 5fae39f826..ef24a16898 100644 --- a/spec/forms/state_file/tax_refund_form_spec.rb +++ b/spec/forms/state_file/tax_refund_form_spec.rb @@ -10,7 +10,6 @@ account_number: "12345", account_number_confirmation: "12345", account_type: "checking", - bank_name: "Bank official", } end @@ -26,7 +25,6 @@ expect(intake.account_type).to eq "unfilled" expect(intake.account_number).to be_nil expect(intake.routing_number).to be_nil - expect(intake.bank_name).to be_nil end end @@ -45,7 +43,6 @@ expect(intake.account_type).to eq "checking" expect(intake.routing_number).to eq "019456124" expect(intake.account_number).to eq "12345" - expect(intake.bank_name).to eq "Bank official" end context "when overwriting an existing intake" do @@ -56,7 +53,6 @@ routing_number: "019456124", account_number: "12345", account_type: "checking", - bank_name: "Bank official" ) end it "updates the intake" do @@ -69,7 +65,6 @@ expect(intake.account_type).to eq "unfilled" expect(intake.account_number).to be_nil expect(intake.routing_number).to be_nil - expect(intake.bank_name).to be_nil end end end @@ -83,7 +78,6 @@ account_number: "123", account_number_confirmation: "", account_type: nil, - bank_name: nil, } end @@ -94,7 +88,6 @@ expect(form.errors[:routing_number_confirmation]).to be_present expect(form.errors[:account_number_confirmation]).to be_present expect(form.errors[:account_type]).to be_present - expect(form.errors[:bank_name]).to be_present end end end @@ -106,7 +99,6 @@ let(:account_number) { "12345" } let(:account_number_confirmation) { "12345" } let(:account_type) { "checking" } - let(:bank_name) { "Bank official" } let(:params) do { payment_or_deposit_type: payment_or_deposit_type, @@ -115,7 +107,6 @@ account_number: account_number, account_number_confirmation: account_number_confirmation, account_type: account_type, - bank_name: bank_name } end diff --git a/spec/forms/state_file/taxes_owed_form_spec.rb b/spec/forms/state_file/taxes_owed_form_spec.rb index 7f96d75e42..9c1cf1deda 100644 --- a/spec/forms/state_file/taxes_owed_form_spec.rb +++ b/spec/forms/state_file/taxes_owed_form_spec.rb @@ -38,7 +38,6 @@ account_number: "12345", account_number_confirmation: "12345", account_type: "checking", - bank_name: "Bank official", withdraw_amount: withdraw_amount, } end @@ -63,7 +62,6 @@ expect(intake.account_type).to eq "checking" expect(intake.routing_number).to eq "019456124" expect(intake.account_number).to eq "12345" - expect(intake.bank_name).to eq "Bank official" expect(intake.date_electronic_withdrawal).to eq Date.parse("April 15th, #{current_year}") end @@ -85,7 +83,6 @@ expect(intake.account_type).to eq "checking" expect(intake.routing_number).to eq "019456124" expect(intake.account_number).to eq "12345" - expect(intake.bank_name).to eq "Bank official" expect(intake.date_electronic_withdrawal).to eq Date.parse("April 15th, #{current_year}") end end @@ -109,7 +106,6 @@ expect(intake.account_type).to eq "checking" expect(intake.routing_number).to eq "019456124" expect(intake.account_number).to eq "12345" - expect(intake.bank_name).to eq "Bank official" expect(intake.date_electronic_withdrawal).to eq Date.parse("April 16th, #{current_year}") end end @@ -125,7 +121,6 @@ account_number: "123", account_number_confirmation: "", account_type: nil, - bank_name: nil, withdraw_amount: nil, date_electronic_withdrawal_month: '3', date_electronic_withdrawal_year: current_year, @@ -141,7 +136,6 @@ expect(form.errors[:routing_number_confirmation]).to be_present expect(form.errors[:account_number_confirmation]).to be_present expect(form.errors[:account_type]).to be_present - expect(form.errors[:bank_name]).to be_present expect(form.errors[:withdraw_amount]).to be_present expect(form.errors[:date_electronic_withdrawal]).to be_present end @@ -161,7 +155,6 @@ let(:account_number) { "12345" } let(:account_number_confirmation) { "12345" } let(:account_type) { "checking" } - let(:bank_name) { "Bank official" } let(:month) { "3" } let(:day) { "15" } let(:year) { current_year } @@ -173,7 +166,6 @@ account_number: account_number, account_number_confirmation: account_number_confirmation, account_type: account_type, - bank_name: bank_name, withdraw_amount: withdraw_amount, date_electronic_withdrawal_month: month, date_electronic_withdrawal_year: year, diff --git a/spec/lib/efile/md/md502_calculator_spec.rb b/spec/lib/efile/md/md502_calculator_spec.rb index 2a192f9f39..cf0965ffe8 100644 --- a/spec/lib/efile/md/md502_calculator_spec.rb +++ b/spec/lib/efile/md/md502_calculator_spec.rb @@ -1364,4 +1364,30 @@ expect(instance.refund_or_owed_amount).to eq(0) end end + + describe "MD502_AUTHORIZE_DIRECT_DEPOSIT" do + context "bank authorization was given" do + it "should return true" do + intake.bank_authorization_confirmed = 'yes' + instance.calculate + expect(instance.lines[:MD502_AUTHORIZE_DIRECT_DEPOSIT].value).to eq(true) + end + end + + context "bank authorization was not given" do + it "should return false" do + intake.bank_authorization_confirmed = 'unfilled' + instance.calculate + expect(instance.lines[:MD502_AUTHORIZE_DIRECT_DEPOSIT].value).to eq(false) + end + end + + context "bank authorization was 'no'" do + it "should return false" do + intake.bank_authorization_confirmed = 'no' + instance.calculate + expect(instance.lines[:MD502_AUTHORIZE_DIRECT_DEPOSIT].value).to eq(false) + end + end + end end diff --git a/spec/lib/pdf_filler/md502_pdf_spec.rb b/spec/lib/pdf_filler/md502_pdf_spec.rb index 79ba7590d3..f560500002 100644 --- a/spec/lib/pdf_filler/md502_pdf_spec.rb +++ b/spec/lib/pdf_filler/md502_pdf_spec.rb @@ -456,6 +456,61 @@ end end + context "Direct deposit of refund" do + before do + intake.update( + payment_or_deposit_type: :direct_deposit, + routing_number: "123456789", + account_number: "87654321", + account_type: "checking", + account_holder_first_name: "Jack", + account_holder_middle_initial: "D", + account_holder_last_name: "Hansel", + has_joint_account_holder: "unfilled", + bank_authorization_confirmed: "yes" + ) + allow_any_instance_of(Efile::Md::Md502Calculator).to receive(:refund_or_owed_amount).and_return 500 + end + + context "bank_authorization_confirmed is empty" do + before do + intake.update(bank_authorization_confirmed: 'unfilled') + end + + it "return Off" do + expect(pdf_fields["Check Box 39"]).to eq "Off" + end + end + + it "checks the refund information with the account holder's full name" do + expect(pdf_fields["Check Box 39"]).to eq "Yes" + expect(pdf_fields["Text Box 95"]).to eq "Jack D Hansel" + expect(pdf_fields["Check Box 41"]).to eq "Yes" + expect(pdf_fields["Check Box 42"]).to eq "Off" + expect(pdf_fields["Text Box 93"]).to eq "123456789" + expect(pdf_fields["Text Box 94"]).to eq "87654321" + end + + context "with joint account holder" do + before do + intake.joint_account_holder_first_name = "Jill" + intake.joint_account_holder_last_name = "Gretl" + intake.joint_account_holder_suffix = "II" + intake.has_joint_account_holder = "yes" + intake.bank_authorization_confirmed = "yes" + end + + it "returns the same information including joint account holder's full name with an 'and'" do + expect(pdf_fields["Check Box 39"]).to eq "Yes" + expect(pdf_fields["Text Box 95"]).to eq "Jack D Hansel and Jill Gretl II" + expect(pdf_fields["Check Box 41"]).to eq "Yes" + expect(pdf_fields["Check Box 42"]).to eq "Off" + expect(pdf_fields["Text Box 93"]).to eq "123456789" + expect(pdf_fields["Text Box 94"]).to eq "87654321" + end + end + end + context "local tax computations" do before do allow_any_instance_of(Efile::Md::Md502Calculator).to receive(:calculate_line_28_local_tax_rate).and_return 0.027 diff --git a/spec/lib/submission_builder/ty2024/states/md/documents/md502_spec.rb b/spec/lib/submission_builder/ty2024/states/md/documents/md502_spec.rb index 14eaac0858..528d84344f 100644 --- a/spec/lib/submission_builder/ty2024/states/md/documents/md502_spec.rb +++ b/spec/lib/submission_builder/ty2024/states/md/documents/md502_spec.rb @@ -468,5 +468,81 @@ expect(xml.at("Form502 TaxWithheld")&.text).to eq('500') end end + + context "AuthToDirectDepositInd" do + context "with bank_authorization_confirmed set to 'yes'" do + before do + allow(intake).to receive(:bank_authorization_confirmed_yes?).and_return true + end + + it 'outputs the total state and local tax withheld' do + expect(xml.at("Form502 AuthToDirectDepositInd")&.text).to eq('X') + end + end + + context "with bank_authorization_confirmed set to 'no' or 'unfilled'" do + before do + allow(intake).to receive(:bank_authorization_confirmed_yes?).and_return false + end + + it 'outputs the total state and local tax withheld' do + expect(xml.at("Form502 AuthToDirectDepositInd")).to be_nil + end + end + end + + context "Line 51d: NameOnBankAccount" do + before do + intake.update( + payment_or_deposit_type: "direct_deposit", + account_holder_first_name: "Jack", + account_holder_middle_initial: "D", + account_holder_last_name: "Hansel" + ) + end + + it 'outputs account holder name' do + expect(xml.at("Form502 NameOnBankAccount FirstName")&.text).to eq("Jack") + expect(xml.at("Form502 NameOnBankAccount MiddleInitial")&.text).to eq("D") + expect(xml.at("Form502 NameOnBankAccount LastName")&.text).to eq("Hansel") + expect(xml.at("Form502 NameOnBankAccount Suffix")).to be_nil + end + + context "with joint account holder" do + before do + intake.joint_account_holder_first_name = "Jill" + intake.joint_account_holder_last_name = "Gretl" + intake.joint_account_holder_suffix = "II" + intake.has_joint_account_holder = "yes" + end + + it "outputs names for both account holders" do + account_holder_xmls = xml.css('Form502 NameOnBankAccount') + expect(account_holder_xmls.count).to eq(2) + + account_holder_xml = account_holder_xmls[0] + expect(account_holder_xml.at("FirstName")&.text).to eq("Jack") + expect(account_holder_xml.at("MiddleInitial")&.text).to eq("D") + expect(account_holder_xml.at("LastName")&.text).to eq("Hansel") + expect(account_holder_xml.at("NameSuffix")).to be_nil + + joint_account_holder_xml = account_holder_xmls[1] + expect(joint_account_holder_xml.at("FirstName")&.text).to eq("Jill") + expect(joint_account_holder_xml.at("MiddleInitial")).to be_nil + expect(joint_account_holder_xml.at("LastName")&.text).to eq("Gretl") + expect(joint_account_holder_xml.at("NameSuffix")&.text).to eq("II") + end + end + + context "with mail" do + before do + intake.payment_or_deposit_type = "mail" + end + + it "should not include account holder information" do + expect(xml.css('Form502 NameOnBankAccount').count).to eq(0) + end + end + end end end diff --git a/spec/models/state_file_az_intake_spec.rb b/spec/models/state_file_az_intake_spec.rb index 6c6780a89a..348bc528cc 100644 --- a/spec/models/state_file_az_intake_spec.rb +++ b/spec/models/state_file_az_intake_spec.rb @@ -7,7 +7,6 @@ # account_type :integer # armed_forces_member :integer default("unfilled"), not null # armed_forces_wages_amount :decimal(12, 2) -# bank_name :string # charitable_cash_amount :decimal(12, 2) # charitable_contributions :integer default("unfilled"), not null # charitable_noncash_amount :decimal(12, 2) @@ -17,7 +16,6 @@ # current_sign_in_ip :inet # current_step :string # date_electronic_withdrawal :date -# df_data_import_failed_at :datetime # df_data_import_succeeded_at :datetime # df_data_imported_at :datetime # eligibility_529_for_non_qual_expense :integer default("unfilled"), not null @@ -96,7 +94,6 @@ create :state_file_ny_intake, payment_or_deposit_type: "direct_deposit", account_type: "checking", - bank_name: "Wells Fargo", routing_number: "123456789", account_number: "123", withdraw_amount: 123, @@ -107,7 +104,6 @@ expect { intake.update(payment_or_deposit_type: "mail") }.to change(intake.reload, :account_type).to("unfilled") - .and change(intake.reload, :bank_name).to(nil) .and change(intake.reload, :routing_number).to(nil) .and change(intake.reload, :account_number).to(nil) .and change(intake.reload, :withdraw_amount).to(nil) diff --git a/spec/models/state_file_id_intake_spec.rb b/spec/models/state_file_id_intake_spec.rb index d9ef93b687..a7a686eedd 100644 --- a/spec/models/state_file_id_intake_spec.rb +++ b/spec/models/state_file_id_intake_spec.rb @@ -5,14 +5,12 @@ # id :bigint not null, primary key # account_number :string # account_type :integer default("unfilled"), not null -# bank_name :string # consented_to_terms_and_conditions :integer default("unfilled"), not null # contact_preference :integer default("unfilled"), not null # current_sign_in_at :datetime # current_sign_in_ip :inet # current_step :string # date_electronic_withdrawal :date -# df_data_import_failed_at :datetime # df_data_import_succeeded_at :datetime # df_data_imported_at :datetime # donate_grocery_credit :integer default("unfilled"), not null diff --git a/spec/models/state_file_md_intake_spec.rb b/spec/models/state_file_md_intake_spec.rb index bd891604ec..867f65538a 100644 --- a/spec/models/state_file_md_intake_spec.rb +++ b/spec/models/state_file_md_intake_spec.rb @@ -3,11 +3,14 @@ # Table name: state_file_md_intakes # # id :bigint not null, primary key -# account_holder_name :string +# account_holder_first_name :string +# account_holder_last_name :string +# account_holder_middle_initial :string +# account_holder_suffix :string # account_number :string # account_type :integer default("unfilled"), not null # authorize_sharing_of_health_insurance_info :integer default("unfilled"), not null -# bank_name :string +# bank_authorization_confirmed :integer default("unfilled"), not null # city :string # confirmed_permanent_address :integer default("unfilled"), not null # consented_to_terms_and_conditions :integer default("unfilled"), not null @@ -16,7 +19,6 @@ # current_sign_in_ip :inet # current_step :string # date_electronic_withdrawal :date -# df_data_import_failed_at :datetime # df_data_import_succeeded_at :datetime # df_data_imported_at :datetime # eligibility_filing_status_mfj :integer default("unfilled"), not null @@ -30,7 +32,12 @@ # failed_attempts :integer default(0), not null # federal_return_status :string # had_hh_member_without_health_insurance :integer default("unfilled"), not null +# has_joint_account_holder :integer default("unfilled"), not null # hashed_ssn :string +# joint_account_holder_first_name :string +# joint_account_holder_last_name :string +# joint_account_holder_middle_initial :string +# joint_account_holder_suffix :string # last_sign_in_at :datetime # last_sign_in_ip :inet # locale :string default("en") @@ -95,7 +102,6 @@ # index_state_file_md_intakes_on_primary_state_id_id (primary_state_id_id) # index_state_file_md_intakes_on_spouse_state_id_id (spouse_state_id_id) # - require 'rails_helper' RSpec.describe StateFileMdIntake, type: :model do @@ -129,23 +135,39 @@ create :state_file_md_intake, payment_or_deposit_type: "direct_deposit", account_type: "checking", - bank_name: "Wells Fargo", routing_number: "123456789", account_number: "123", withdraw_amount: 123, date_electronic_withdrawal: Date.parse("April 1, #{Rails.configuration.statefile_current_tax_year}"), - account_holder_name: "Neil Peart" + account_holder_first_name: "Neil", + account_holder_middle_initial: "B", + account_holder_last_name: "Peart", + account_holder_suffix: 'VIII', + joint_account_holder_first_name: "Belle", + joint_account_holder_middle_initial: "C", + joint_account_holder_last_name: "Peart", + joint_account_holder_suffix: "JR", + has_joint_account_holder: "yes", + bank_authorization_confirmed: "yes" end it "clears other account fields" do expect { intake.update(payment_or_deposit_type: "mail") }.to change(intake.reload, :account_type).to("unfilled") - .and change(intake.reload, :bank_name).to(nil) .and change(intake.reload, :routing_number).to(nil).and change(intake.reload, :account_number).to(nil) .and change(intake.reload, :withdraw_amount).to(nil) .and change(intake.reload, :date_electronic_withdrawal).to(nil) - .and change(intake.reload, :account_holder_name).to(nil) + .and change(intake.reload, :account_holder_first_name).to(nil) + .and change(intake.reload, :account_holder_middle_initial).to(nil) + .and change(intake.reload, :account_holder_last_name).to(nil) + .and change(intake.reload, :account_holder_suffix).to(nil) + .and change(intake.reload, :joint_account_holder_first_name).to(nil) + .and change(intake.reload, :joint_account_holder_middle_initial).to(nil) + .and change(intake.reload, :joint_account_holder_last_name).to(nil) + .and change(intake.reload, :joint_account_holder_suffix).to(nil) + .and change(intake.reload, :has_joint_account_holder).to("unfilled") + .and change(intake.reload, :bank_authorization_confirmed).to("unfilled") end end end diff --git a/spec/models/state_file_nc_intake_spec.rb b/spec/models/state_file_nc_intake_spec.rb index 2436b56481..4d247a3a82 100644 --- a/spec/models/state_file_nc_intake_spec.rb +++ b/spec/models/state_file_nc_intake_spec.rb @@ -5,7 +5,6 @@ # id :bigint not null, primary key # account_number :string # account_type :integer default("unfilled"), not null -# bank_name :string # city :string # consented_to_terms_and_conditions :integer default("unfilled"), not null # contact_preference :integer default("unfilled"), not null @@ -13,7 +12,6 @@ # current_sign_in_ip :inet # current_step :string # date_electronic_withdrawal :date -# df_data_import_failed_at :datetime # df_data_import_succeeded_at :datetime # df_data_imported_at :datetime # eligibility_lived_in_state :integer default("unfilled"), not null diff --git a/spec/models/state_file_nj_intake_spec.rb b/spec/models/state_file_nj_intake_spec.rb index 4796bfce85..662ed51185 100644 --- a/spec/models/state_file_nj_intake_spec.rb +++ b/spec/models/state_file_nj_intake_spec.rb @@ -5,7 +5,6 @@ # id :bigint not null, primary key # account_number :string # account_type :integer default("unfilled"), not null -# bank_name :string # claimed_as_dep :integer # claimed_as_eitc_qualifying_child :integer default("unfilled"), not null # consented_to_terms_and_conditions :integer default("unfilled"), not null @@ -15,7 +14,6 @@ # current_sign_in_ip :inet # current_step :string # date_electronic_withdrawal :date -# df_data_import_failed_at :datetime # df_data_import_succeeded_at :datetime # df_data_imported_at :datetime # eligibility_all_members_health_insurance :integer default("unfilled"), not null diff --git a/spec/models/state_file_ny_intake_spec.rb b/spec/models/state_file_ny_intake_spec.rb index e818874862..b88c2797ba 100644 --- a/spec/models/state_file_ny_intake_spec.rb +++ b/spec/models/state_file_ny_intake_spec.rb @@ -5,7 +5,6 @@ # id :bigint not null, primary key # account_number :string # account_type :integer default("unfilled"), not null -# bank_name :string # confirmed_permanent_address :integer default("unfilled"), not null # confirmed_third_party_designee :integer default("unfilled"), not null # consented_to_terms_and_conditions :integer default("unfilled"), not null @@ -14,7 +13,6 @@ # current_sign_in_ip :inet # current_step :string # date_electronic_withdrawal :date -# df_data_import_failed_at :datetime # df_data_import_succeeded_at :datetime # df_data_imported_at :datetime # eligibility_lived_in_state :integer default("unfilled"), not null @@ -142,7 +140,6 @@ create :state_file_ny_intake, payment_or_deposit_type: "direct_deposit", account_type: "checking", - bank_name: "Wells Fargo", routing_number: "123456789", account_number: "123", withdraw_amount: 123, @@ -153,7 +150,6 @@ expect { intake.update(payment_or_deposit_type: "mail") }.to change(intake.reload, :account_type).to("unfilled") - .and change(intake.reload, :bank_name).to(nil) .and change(intake.reload, :routing_number).to(nil) .and change(intake.reload, :account_number).to(nil) .and change(intake.reload, :withdraw_amount).to(nil)