Skip to content

Commit

Permalink
move tax notices settings into new yml file and rename feature
Browse files Browse the repository at this point in the history
  • Loading branch information
saipraveen18 committed Dec 5, 2023
1 parent 193ec25 commit 9f5b670
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
4 changes: 2 additions & 2 deletions app/models/irs_yearly_pdf_report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ def fill_subscriber_details
# rubocop:enable Metrics/AbcSize

def fetch_insurance_provider_title(title)
return title unless PolypressRegistry.feature_enabled?(:tax_notices)
return title unless PolypressRegistry.feature_enabled?(:modify_carrier_legal_names)

mapping = PolypressRegistry[:tax_notices].settings(:carrier_names_mapping).item
mapping = PolypressRegistry[:modify_carrier_legal_names].settings(:carrier_names_mapping).item
mapped_title = mapping[title.to_sym].to_s
mapped_title.present? ? mapped_title : title
end
Expand Down
4 changes: 2 additions & 2 deletions spec/models/irs_yearly_pdf_report_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
'Harvard Pilgrim Health Care': "Harvard Pilgrim Health Care Inc",
'Community Health Options': "Maine Community Health Options",
'Taro Health': "Taro Health Plan of Maine Inc" }
allow(PolypressRegistry).to receive(:[]).with(:tax_notices).and_return(setting)
allow(PolypressRegistry).to receive(:[]).with(:modify_carrier_legal_names).and_return(setting)
allow(setting).to receive(:settings).with(:carrier_names_mapping).and_return(double(item: mapping))
end

Expand Down Expand Up @@ -101,7 +101,7 @@
let(:setting) { double }

before :each do
allow(PolypressRegistry).to receive(:feature_enabled?).with(:tax_notices).and_return(false)
allow(PolypressRegistry).to receive(:feature_enabled?).with(:modify_carrier_legal_names).and_return(false)
end

it "returns provider_title as is" do
Expand Down
8 changes: 0 additions & 8 deletions system/config/templates/features/enroll_app/reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,3 @@ registry:
settings:
- key: :carrier_hios_ids
item: ["96667", "48396", "33653", "50165", "54879"]
- key: :tax_notices
is_enabled: true
settings:
- key: :carrier_names_mapping
item: {"Anthem Blue Cross and Blue Shield": "Anthem Health Plans of Maine Inc",
"Harvard Pilgrim Health Care": "Harvard Pilgrim Health Care Inc",
"Community Health Options": "Maine Community Health Options",
"Taro Health": "Taro Health Plan of Maine Inc"}
13 changes: 13 additions & 0 deletions system/config/templates/features/tax_notices.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
registry:
- namespace:
- :features
features:
- key: :modify_carrier_legal_names
is_enabled: true
settings:
- key: :carrier_names_mapping
item: {"Anthem Blue Cross and Blue Shield": "Anthem Health Plans of Maine Inc",
"Harvard Pilgrim Health Care": "Harvard Pilgrim Health Care Inc",
"Community Health Options": "Maine Community Health Options",
"Taro Health": "Taro Health Plan of Maine Inc"}

0 comments on commit 9f5b670

Please sign in to comment.