Author: ygrego Date: 2015-05-19 08:55:19 +0000 (Tue, 19 May 2015) New Revision: 1384 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1384 Log: Addition of methods "testSetBlockUnratedWithValidPINAndTrue" and "testSetBlockUnratedWithValidPINAndFalse". Modified: oipf/js/test/ParentalControlManagerTest.js Modified: oipf/js/test/ParentalControlManagerTest.js =================================================================== --- oipf/js/test/ParentalControlManagerTest.js 2015-05-19 08:53:23 UTC (rev 1383) +++ oipf/js/test/ParentalControlManagerTest.js 2015-05-19 08:55:19 UTC (rev 1384) @@ -11,6 +11,7 @@ this.PIN_CORRECT = 0; this.PIN_INCORRECT = 1; this.PIN_LOCKED = 2; + this.PIN = "1234"; }, beforeTest: function() { @@ -64,7 +65,33 @@ reject(); } }, + + testSetBlockUnratedWithValidPINAndTrue: function(resolve, reject) { + var result = this.parentalControlManagerObject + .setBlockUnrated(this.PIN, true); + + console.log(result); + + if (this.assertEquals(result, 0)) { + resolve(); + } else { + reject(); + } + }, + testSetBlockUnratedWithValidPINAndFalse: function(resolve, reject) { + var result = this.parentalControlManagerObject + .setBlockUnrated(this.PIN, false); + + console.log(result); + + if (this.assertEquals(result, 0)) { + resolve(); + } else { + reject(); + } + }, + testGetBlockUnratedWhenUnratedContentsAreBlocked: function(resolve, reject) { this.parentalControlManagerObject.setBlockUnrated("1234", true);
participants (1)
-
ygregoï¼ users.nuiton.org