diff --git a/app/models/profile.rb b/app/models/profile.rb index 2ffc54c38d5..7af8707d628 100644 --- a/app/models/profile.rb +++ b/app/models/profile.rb @@ -90,21 +90,11 @@ def self.build_compound_pii(pii) values.join(':') end - def includes_liveness_check? - return false if proofing_components.blank? - proofing_components['liveness_check'].present? - end - def includes_phone_check? return false if proofing_components.blank? proofing_components['address_check'] == 'lexis_nexis_address' end - def strict_ial2_proofed? - return false unless active - includes_liveness_check? - end - def has_proofed_before? Profile.where(user_id: user_id).where.not(activated_at: nil).where.not(id: self.id).exists? end diff --git a/spec/models/profile_spec.rb b/spec/models/profile_spec.rb index 214ef2ec6dc..6952f2601e8 100644 --- a/spec/models/profile_spec.rb +++ b/spec/models/profile_spec.rb @@ -46,26 +46,6 @@ end end - describe '#includes_liveness_check?' do - it 'returns true if a component for liveness is present' do - profile = create(:profile, proofing_components: { liveness_check: 'acuant' }) - - expect(profile.includes_liveness_check?).to eq(true) - end - - it 'returns false if a component for liveness is not present' do - profile = create(:profile, proofing_components: { liveness_check: nil }) - - expect(profile.includes_liveness_check?).to eq(false) - end - - it 'returns false if proofing_components is blank' do - profile = create(:profile, proofing_components: '') - - expect(profile.includes_liveness_check?).to eq(false) - end - end - describe '#includes_phone_check?' do it 'returns true if the address_check component is lexis_nexis_address' do profile = create(:profile, proofing_components: { address_check: 'lexis_nexis_address' }) @@ -86,28 +66,6 @@ end end - describe '#strict_ial2_proofed?' do - it 'returns false if the profile is not active' do - profile = create(:profile, active: false) - - expect(profile.strict_ial2_proofed?).to eq(false) - end - - it 'returns true if the profile does have liveness' do - proofing_components = { liveness_check: :acuant } - profile = create(:profile, :active, proofing_components: proofing_components) - - expect(profile.strict_ial2_proofed?).to eq(true) - end - - it 'returns false if the profile does not have liveness' do - proofing_components = { liveness_check: nil } - profile = create(:profile, :active, proofing_components: proofing_components) - - expect(profile.strict_ial2_proofed?).to eq(false) - end - end - describe '#encrypt_pii' do subject(:encrypt_pii) { profile.encrypt_pii(pii, user.password) }