From 3efc2b9fabdae5958c9e251b106a8af16a37ff85 Mon Sep 17 00:00:00 2001 From: mama Date: Wed, 6 Dec 2017 20:13:38 +0100 Subject: [PATCH] :white_check_mark: Adaptation des tests aux changements de branche --- test/results.grid.test.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/test/results.grid.test.js b/test/results.grid.test.js index 3253f245e..cb8fc35ed 100644 --- a/test/results.grid.test.js +++ b/test/results.grid.test.js @@ -27,7 +27,7 @@ describe('results grid', function() { expect(branches).to.have.lengthOf(4) expect(branches).to.include("chômage") - expect(branches).to.include("maladie") + expect(branches).to.include("santé") expect(branches).to.include("retraite") expect(branches).to.include("autre") }); @@ -47,13 +47,15 @@ describe('results grid', function() { result = byBranch(analysis), branches = R.keys(result) - expect(branches).to.have.lengthOf(6) + expect(branches).to.have.lengthOf(8) expect(branches).to.include("chômage") - expect(branches).to.include("maladie") + expect(branches).to.include("santé") expect(branches).to.include("retraite") expect(branches).to.include("logement") expect(branches).to.include("famille") - expect(branches).to.include("autre") + expect(branches).to.include("autre") + expect(branches).to.include("transport") + expect(branches).to.include("formation") }); it('should collect cells by name', function() { @@ -69,14 +71,15 @@ describe('results grid', function() { let analysis = step2.analysis, result = byBranch(analysis), - maladie = byName(result.maladie), + maladie = byName(result['santé']), names = R.keys(maladie) - expect(names).to.have.lengthOf(4) + expect(names).to.have.lengthOf(5) expect(names).to.include("contrat salarié . maladie") expect(names).to.include("contrat salarié . ATMP") expect(names).to.include("contrat salarié . complémentaire santé") - expect(names).to.include("contrat salarié . cotisation pénibilité") + expect(names).to.include("contrat salarié . cotisation pénibilité") + expect(names).to.include("contrat salarié . prévoyance obligatoire cadre") }); it('should sum cells by branch and payer', function() { @@ -109,7 +112,7 @@ describe('results grid', function() { let analysis = step2.analysis, result = byBranch(analysis), - maladie = byName(result.maladie) + maladie = byName(result['santé']) expect(subCell(maladie,"contrat salarié . ATMP","salarié")).to.be.closeTo(0, 0.1) expect(subCell(maladie,"contrat salarié . ATMP","employeur")).to.be.closeTo(54, 1)