diff options
author | Matěj Cepl <mcepl@redhat.com> | 2010-07-16 01:57:10 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2010-07-16 04:24:35 +0200 |
commit | 91aac059810fec3d849bb48eb51f55e64b1cc32b (patch) | |
tree | f2b1da249409e413c2bb03279ef46077cb79707e /tests/test-password.js | |
parent | 2b1cf2b13c8d75feff30fdcf93bdb390523e1fd9 (diff) | |
parent | ff9af9afae670abd2944ad56705032285db08bc0 (diff) | |
download | bugzilla-triage-91aac059810fec3d849bb48eb51f55e64b1cc32b.tar.gz |
Merge branch 'betterPasswordHandling'
Diffstat (limited to 'tests/test-password.js')
-rw-r--r-- | tests/test-password.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/test-password.js b/tests/test-password.js new file mode 100644 index 0000000..e46ed9c --- /dev/null +++ b/tests/test-password.js @@ -0,0 +1,18 @@ +/*jslint forin: true, rhino: true, onevar: false, browser: true, evil: true, laxbreak: true, undef: true, nomen: true, eqeqeq: true, bitwise: true, maxerr: 1000, immed: false, white: false, plusplus: false, regexp: false, undef: false */ +// Released under the MIT/X11 license +// http://www.opensource.org/licenses/mit-license.php +"use strict"; +var passMod = require("passwords"); +var BTSRealm = "BTSTest"; +var testLogin = "testUser"; +var testPass = "verySecret"; +var testDomain = "http://www.example.com"; + +exports.ensurePasswordMachinery = function (test) { + passMod.setLogin(testLogin, testPass, + testDomain, BTSRealm); + test.assertEqual(passMod.getPassword(testLogin, + testDomain, BTSRealm), testPass, ""); + passMod.removeLogin(testLogin, testPass, + testDomain, BTSRealm); +}; |