Skip to content

Commit

Permalink
mock the note view in the note controller to print a list
Browse files Browse the repository at this point in the history
  • Loading branch information
majdeddine committed Dec 6, 2017
1 parent be62a75 commit e6dedd7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions js/note-controller-test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
var doubleViewNote ={toHtml: "<ul><li><div>Favourite drink: seltzer</div></li></ul>" };

function returnHtmlElement (){
var noteController = new NoteController();
noteController.getElementOf('app');
Expand All @@ -13,3 +15,11 @@ function changeHtmlElement(){
assert.isTrue(noteController._element.innerHTML === 'ola')
}
changeHtmlElement();

function changeHtmlElementToList(){
var noteController = new NoteController();
noteController.getElementOf('app');
noteController.changeContent(doubleViewNote.toHtml);
assert.isTrue(noteController._element.innerHTML === "<ul><li><div>Favourite drink: seltzer</div></li></ul>")
}
changeHtmlElementToList();

0 comments on commit e6dedd7

Please sign in to comment.