Skip to content

Commit

Permalink
arf.80297 remove VerifiedRepresentatives first, last, MI
Browse files Browse the repository at this point in the history
See discussion:
#16493 (comment)
  • Loading branch information
gabezurita committed Apr 25, 2024
1 parent d3c694a commit 861f779
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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) }

Expand Down

0 comments on commit 861f779

Please sign in to comment.