Skip to content

Commit

Permalink
cv3 payload specs
Browse files Browse the repository at this point in the history
  • Loading branch information
erubinst committed Jun 13, 2024
1 parent 8f38465 commit aa9dac0
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@
let!(:glue_dependent_person_2) { FactoryBot.create(:person, authority_member_id: another_dependent_person.hbx_id) }
let(:year) { Date.today.year }
let(:insurance_policy) { FactoryBot.create(:insurance_policy, start_on: Date.new(year, 1, 1), end_on: Date.new(year, 12, 31)) }
let(:insurance_policy_npt_eom) do
FactoryBot.create(:insurance_policy, start_on: Date.new(year, 1, 1),
end_on: Date.new(year, 5, 31),
term_for_np: true)
end
let(:insurance_policy_npt_mid_month) do
FactoryBot.create(:insurance_policy, start_on: Date.new(year, 1, 1),
end_on: Date.new(year, 3, 3),
term_for_np: true)
end
let(:subscriber) { FactoryBot.build(:enrolled_member, person: subscriber_person) }
let(:dependents) { FactoryBot.build(:enrolled_member, person: dependent_person) }

Expand Down Expand Up @@ -512,5 +522,20 @@
end
expect(result).to be_truthy
end

it "should have 0.00 premium for the first npt grace month" do
@npt_eom_results = subject.call({ insurance_policy: insurance_policy_npt_eom }).value!
@npt_mid_month_results = subject.call({ insurance_policy: insurance_policy_npt_mid_month }).value!
eom_result = @npt_results[:aptc_csr_tax_households][0]["May"]["coverage_information"]["total_premium"]
mid_month_result = @npt_mid_month_results[:aptc_csr_tax_households][0]["February"]["coverage_information"]["total_premium"]
expect(eom_result).to eq 0.00
expect(mid_month_result).to eq 0.00
end

it "should have nil premium for the second grace month" do
@npt_mid_month_results = subject.call({ insurance_policy: insurance_policy_npt_mid_month }).value!
mid_month_result = @npt_mid_month_results[:aptc_csr_tax_households][0]["March"]["coverage_information"]["total_premium"]
expect(mid_month_result).to be_nil
end
end
end

0 comments on commit aa9dac0

Please sign in to comment.