Skip to content

Commit

Permalink
Expand EP400 Merge eligibility to multi-contention claims (#17440)
Browse files Browse the repository at this point in the history
* Expand EP400 Merge eligibility to multi-contention claims

* Fix lint warning
  • Loading branch information
nanotone authored Jul 9, 2024
1 parent 629a325 commit 75ac1bd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/models/concerns/form526_claim_fast_tracking_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,11 @@ def diagnostic_codes
end

def eligible_for_ep_merge?
user = User.find(user_uuid)
return true if Flipper.enabled?(:disability_526_ep_merge_multi_contention, user)
return false unless disabilities.count == 1

Flipper.enabled?(:disability_526_ep_merge_new_claims, User.find(user_uuid)) ? increase_or_new? : increase_only?
Flipper.enabled?(:disability_526_ep_merge_new_claims, user) ? increase_or_new? : increase_only?
end

def prepare_for_evss!
Expand Down
3 changes: 3 additions & 0 deletions config/features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,9 @@ features:
disability_526_ep_merge_new_claims:
actor_type: user
description: enables EP Merge for single-contention 526 claims for a new condition
disability_526_ep_merge_multi_contention:
actor_type: user
description: enables EP Merge for multi-contention 526 claims
disability_526_toxic_exposure:
actor_type: user
description: enables new pages, processing, and submission of toxic exposure claims
Expand Down
12 changes: 11 additions & 1 deletion spec/models/form526_submission_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1274,10 +1274,20 @@ def expect_max_cfi_logged(max_cfi_enabled, disability_claimed, diagnostic_code,
describe '#eligible_for_ep_merge?' do
subject { Form526Submission.create(form_json: File.read(path)).eligible_for_ep_merge? }

before { Flipper.disable(:disability_526_ep_merge_multi_contention) }

context 'when there are multiple contentions' do
let(:path) { 'spec/support/disability_compensation_form/submissions/only_526_mixed_action_disabilities.json' }

it { is_expected.to be_falsey }
context 'when multi-contention claims are not eligible' do
it { is_expected.to be_falsey }
end

context 'when multi-contention claims are eligible' do
before { Flipper.enable(:disability_526_ep_merge_multi_contention) }

it { is_expected.to be_truthy }
end
end

context 'when there is a single new contention' do
Expand Down

0 comments on commit 75ac1bd

Please sign in to comment.