-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CORRECTION] Corrige le statut de saisie des mesures générales
- Loading branch information
1 parent
6df37fa
commit 4acb486
Showing
5 changed files
with
59 additions
and
5 deletions.
There are no files selected for viewing
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
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,30 @@ | ||
const expect = require('expect.js'); | ||
|
||
const MesuresGenerales = require('../../src/modeles/mesuresGenerales'); | ||
|
||
const { A_SAISIR, COMPLETES, A_COMPLETER } = MesuresGenerales; | ||
|
||
describe('La liste des mesures générales', () => { | ||
const referentiel = { identifiantsMesures: () => ['mesure'] }; | ||
|
||
it("est à saisir quand rien n'est saisi", () => { | ||
const donnees = { mesuresGenerales: [] }; | ||
const mesuresGenerales = new MesuresGenerales(donnees); | ||
|
||
expect(mesuresGenerales.statutSaisie()).to.equal(A_SAISIR); | ||
}); | ||
|
||
it('est complete quand les mesures sont completes', () => { | ||
const donnees = { mesuresGenerales: [{ id: 'mesure', statut: 'fait' }] }; | ||
const mesuresGenerales = new MesuresGenerales(donnees, referentiel); | ||
|
||
expect(mesuresGenerales.statutSaisie()).to.equal(COMPLETES); | ||
}); | ||
|
||
it('est à completer quand toutes les mesures ne sont pas completes', () => { | ||
const donnees = { mesuresGenerales: [{ id: 'mesure' }] }; | ||
const mesuresGenerales = new MesuresGenerales(donnees, referentiel); | ||
|
||
expect(mesuresGenerales.statutSaisie()).to.equal(A_COMPLETER); | ||
}); | ||
}); |