-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Note pour plus tard : - Quand on s'occupera de revoir l'utilisation du cookie de session, il faudra regarder où est-ce qu'on veut initialiser `jwtSessionFCPlus`, actuellement stocké dans `Utilisateur` Co-authored-by: Fabien Lamarque <[email protected]>
- Loading branch information
Showing
9 changed files
with
45 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class Utilisateur { | ||
constructor(donnees) { | ||
this.prenom = donnees.prenom; | ||
this.nomUsage = donnees.nomUsage; | ||
this.jwtSessionFCPlus = donnees.jwtSessionFCPlus; | ||
} | ||
|
||
afficheToi() { | ||
return `${this.prenom} ${this.nomUsage}`; | ||
} | ||
} | ||
|
||
module.exports = Utilisateur; |
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,8 @@ | ||
const Utilisateur = require('../../src/modeles/utilisateur'); | ||
|
||
describe("L'utilisateur courant", () => { | ||
it("sait s'afficher", () => { | ||
const utilisateur = new Utilisateur({ prenom: 'Juliette', nomUsage: 'Haucourt' }); | ||
expect(utilisateur.afficheToi()).toBe('Juliette Haucourt'); | ||
}); | ||
}); |
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