mirror of
https://github.com/we-promise/sure.git
synced 2026-05-12 23:25:00 +00:00
Add assurance vie to investment subtypes (#1665)
* add assurance vie in investment subtype * add unit test for assurance vie subtype
This commit is contained in:
@@ -50,6 +50,7 @@ class Investment < ApplicationRecord
|
|||||||
"smsf" => { short: "SMSF", long: "Self-Managed Super Fund", region: "au", tax_treatment: :tax_deferred },
|
"smsf" => { short: "SMSF", long: "Self-Managed Super Fund", region: "au", tax_treatment: :tax_deferred },
|
||||||
|
|
||||||
# === Europe ===
|
# === Europe ===
|
||||||
|
"assurance_vie" => { short: "AV", long: "Assurance Vie", region: "eu", tax_treatment: :tax_advantaged },
|
||||||
"pea" => { short: "PEA", long: "Plan d'Épargne en Actions", region: "eu", tax_treatment: :tax_advantaged },
|
"pea" => { short: "PEA", long: "Plan d'Épargne en Actions", region: "eu", tax_treatment: :tax_advantaged },
|
||||||
"pillar_3a" => { short: "Pillar 3a", long: "Private Pension (Pillar 3a)", region: "eu", tax_treatment: :tax_deferred },
|
"pillar_3a" => { short: "Pillar 3a", long: "Private Pension (Pillar 3a)", region: "eu", tax_treatment: :tax_deferred },
|
||||||
"riester" => { short: "Riester", long: "Riester-Rente", region: "eu", tax_treatment: :tax_deferred },
|
"riester" => { short: "Riester", long: "Riester-Rente", region: "eu", tax_treatment: :tax_deferred },
|
||||||
|
|||||||
@@ -99,6 +99,10 @@ class InvestmentTest < ActiveSupport::TestCase
|
|||||||
assert_equal :tax_advantaged, investment.tax_treatment
|
assert_equal :tax_advantaged, investment.tax_treatment
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test "tax_treatment returns tax_advantaged for French AV" do
|
||||||
|
investment = Investment.new(subtype: "assurance_vie")
|
||||||
|
assert_equal :tax_advantaged, investment.tax_treatment
|
||||||
|
end
|
||||||
# Generic account types
|
# Generic account types
|
||||||
|
|
||||||
test "tax_treatment returns tax_deferred for generic pension and retirement" do
|
test "tax_treatment returns tax_deferred for generic pension and retirement" do
|
||||||
|
|||||||
Reference in New Issue
Block a user