-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
05937b4
commit 7e58ed9
Showing
3 changed files
with
86 additions
and
6 deletions.
There are no files selected for viewing
6 changes: 1 addition & 5 deletions
6
modele-social/règles/dirigeant/professions-libérales/profession-libérale.publicodes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import rules, { DottedName } from 'modele-social' | ||
import Engine from 'publicodes' | ||
import { beforeEach, describe, expect, it } from 'vitest' | ||
|
||
import { logApplicability, logValue } from './helpers/logValue' | ||
|
||
const situationProfessionLibérale = { | ||
salarié: 'non', | ||
'entreprise . activité . nature': "'libérale'", | ||
'entreprise . catégorie juridique': "'EI'", | ||
'entreprise . imposition': "'IR'", | ||
'entreprise . catégorie juridique . EI . auto-entrepreneur': 'non', | ||
} | ||
|
||
describe('Une profession libérale', () => { | ||
let engine: Engine<DottedName> | ||
beforeEach(() => { | ||
engine = new Engine(rules) | ||
}) | ||
|
||
const situationCIPAV = { | ||
...situationProfessionLibérale, | ||
'entreprise . activité . nature . libérale . réglementée': 'oui', | ||
} | ||
|
||
describe('en CIPAV ACRE', () => { | ||
const situationCIPAVACRE = { | ||
...situationCIPAV, | ||
'dirigeant . rémunération . net': '5000 €/an', | ||
'dirigeant . exonérations . ACRE': 'oui', | ||
'entreprise . date de création': '11/11/2023', | ||
} | ||
|
||
it('paie une retraite de base', () => { | ||
const e = engine.setSituation(situationCIPAVACRE) | ||
|
||
logValue(e, 'dirigeant . indépendant') | ||
logValue( | ||
e, | ||
'dirigeant . indépendant . cotisations et contributions . retraite de base' | ||
) | ||
logValue( | ||
e, | ||
'dirigeant . indépendant . cotisations et contributions . retraite de base . taux' | ||
) | ||
logValue(e, 'protection sociale . retraite . base . cotisée') | ||
|
||
logValue( | ||
e, | ||
'protection sociale . retraite . base . cotisée . indépendant' | ||
) | ||
logValue(e, 'entreprise . activité . nature') | ||
logValue(e, 'entreprise . activité . nature . libérale . réglementée') | ||
|
||
logApplicability(e, 'dirigeant . indépendant') | ||
logApplicability(e, 'dirigeant . indépendant . PL') | ||
|
||
logValue(e, 'dirigeant . indépendant . PL . métier') | ||
logValue(e, 'dirigeant . indépendant') | ||
logValue(e, 'dirigeant . indépendant . PL') | ||
logValue(e, 'dirigeant . indépendant . PL . régime général') | ||
logValue(e, 'dirigeant . indépendant . PL . CNAVPL') | ||
|
||
expect(e).toEvaluate('protection sociale . retraite . base . CNAVPL', 38) | ||
expect(e).toEvaluate('protection sociale . retraite . base', 38) | ||
}) | ||
}) | ||
}) |