From 861f77927278eb9c0fd2eca3acedcb41a823139a Mon Sep 17 00:00:00 2001 From: Gabriel Zurita Date: Thu, 25 Apr 2024 16:15:22 -0600 Subject: [PATCH] arf.80297 remove VerifiedRepresentatives first, last, MI See discussion: https://github.com/department-of-veterans-affairs/vets-api/pull/16493#discussion_r1580087321 --- ...ccredited_representative_portal_verified_representatives.rb | 3 --- .../verified_representative.rb | 2 -- .../spec/factories/verified_representative.rb | 3 --- .../verified_representative_spec.rb | 2 -- 4 files changed, 10 deletions(-) diff --git a/db/migrate/20240418233828_create_accredited_representative_portal_verified_representatives.rb b/db/migrate/20240418233828_create_accredited_representative_portal_verified_representatives.rb index d5e5b1fc7ab..baa6ed0071d 100644 --- a/db/migrate/20240418233828_create_accredited_representative_portal_verified_representatives.rb +++ b/db/migrate/20240418233828_create_accredited_representative_portal_verified_representatives.rb @@ -4,9 +4,6 @@ class CreateAccreditedRepresentativePortalVerifiedRepresentatives < ActiveRecord def change create_table :accredited_representative_portal_verified_representatives do |t| t.string :ogc_registration_number, null: false - t.string :first_name - t.string :last_name - t.string :middle_initial t.string :email, null: false t.timestamps diff --git a/modules/accredited_representative_portal/app/models/accredited_representative_portal/verified_representative.rb b/modules/accredited_representative_portal/app/models/accredited_representative_portal/verified_representative.rb index 99d6327d0f7..6439ddee93d 100644 --- a/modules/accredited_representative_portal/app/models/accredited_representative_portal/verified_representative.rb +++ b/modules/accredited_representative_portal/app/models/accredited_representative_portal/verified_representative.rb @@ -21,8 +21,6 @@ class VerifiedRepresentative < ApplicationRecord 'Please review before attempting to add this `VerifiedRepresentative` record.' validates :ogc_registration_number, presence: true, uniqueness: { case_sensitive: false } - validates :first_name, presence: true - validates :last_name, presence: true validates :email, presence: true, uniqueness: true, format: { with: URI::MailTo::EMAIL_REGEXP } before_save :validate_unique_accredited_individual_email diff --git a/modules/accredited_representative_portal/spec/factories/verified_representative.rb b/modules/accredited_representative_portal/spec/factories/verified_representative.rb index aaa10cf8806..e90fbbe2e34 100644 --- a/modules/accredited_representative_portal/spec/factories/verified_representative.rb +++ b/modules/accredited_representative_portal/spec/factories/verified_representative.rb @@ -3,9 +3,6 @@ FactoryBot.define do factory :verified_representative, class: 'AccreditedRepresentativePortal::VerifiedRepresentative' do ogc_registration_number { Faker::Number.unique.number(digits: 6).to_s } - first_name { Faker::Name.first_name } - last_name { Faker::Name.last_name } - middle_initial { Faker::Name.middle_name } email { Faker::Internet.unique.email } end end diff --git a/modules/accredited_representative_portal/spec/models/accredited_representatiive_portal/verified_representative_spec.rb b/modules/accredited_representative_portal/spec/models/accredited_representatiive_portal/verified_representative_spec.rb index 23888226102..1512b145e0f 100644 --- a/modules/accredited_representative_portal/spec/models/accredited_representatiive_portal/verified_representative_spec.rb +++ b/modules/accredited_representative_portal/spec/models/accredited_representatiive_portal/verified_representative_spec.rb @@ -8,8 +8,6 @@ it { is_expected.to validate_presence_of(:ogc_registration_number) } it { is_expected.to validate_uniqueness_of(:ogc_registration_number).case_insensitive } - it { is_expected.to validate_presence_of(:first_name) } - it { is_expected.to validate_presence_of(:last_name) } it { is_expected.to validate_presence_of(:email) } it { is_expected.to validate_uniqueness_of(:email) }