Author: ygrego Date: 2015-05-18 11:43:15 +0000 (Mon, 18 May 2015) New Revision: 1359 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1359 Log: Addition of method "testVerifyParentalControlPINWithValidPIN" and severals constants in constructor. Modified: oipf/js/test/ParentalControlManagerTest.js Modified: oipf/js/test/ParentalControlManagerTest.js =================================================================== --- oipf/js/test/ParentalControlManagerTest.js 2015-05-18 11:08:59 UTC (rev 1358) +++ oipf/js/test/ParentalControlManagerTest.js 2015-05-18 11:43:15 UTC (rev 1359) @@ -8,6 +8,9 @@ init: function() { this.super.init(); + this.PIN_CORRECT = 0; + this.PIN_INCORRECT = 1; + this.PIN_LOCKED = 2; }, beforeTest: function() { @@ -28,6 +31,19 @@ } resolve(); + }, + + testVerifyParentalControlPINWithValidPIN: function(resolve, reject) { + var result = this.parentalControlManagerObject + .verifyParentalControlPIN("1234"); + + console.log(result); + + if (this.assertEquals(result, this.PIN_CORRECT)) { + resolve(); + } else { + reject(); + } } }); \ No newline at end of file