Author: ygrego Date: 2015-05-18 13:32:43 +0000 (Mon, 18 May 2015) New Revision: 1370 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1370 Log: Addition of methods "testSetBlockUnratedWithInvalidPIN10Times" and "testGetBlockUnrated". Modified: oipf/js/test/ParentalControlManagerTest.js Modified: oipf/js/test/ParentalControlManagerTest.js =================================================================== --- oipf/js/test/ParentalControlManagerTest.js 2015-05-18 13:31:27 UTC (rev 1369) +++ oipf/js/test/ParentalControlManagerTest.js 2015-05-18 13:32:43 UTC (rev 1370) @@ -48,6 +48,28 @@ } else { reject(); } + }, + + testSetBlockUnratedWithInvalidPIN10Times: function(resolve, reject) { + for(var i = 0, li = 10; i < li; i++) { + var result = this.parentalControlManagerObject + .setBlockUnrated("toto", true); + + console.log(i+1, ":", result); + } + + if (this.assertEquals(result, 2)) { + resolve(); + } else { + reject(); + } + }, + + testGetBlockUnrated: function(resolve, reject) { + if (!this.parentalControlManagerObject.getBlockUnrated()) { + resolve(); + } else { + reject(); + } } - }); \ No newline at end of file