aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test-password.js
blob: e605dc4e1bc36e08be347801fc3ac76b0ca8f183 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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.ensureSetPassword = function (test) {    
    passMod.setPassword(testLogin, testPass,
        testDomain, BTSRealm);
    test.assertEqual(passMod.getPassword(testLogin,
        testDomain, BTSRealm), testPass, "");
    passMod.removePassword(testLogin, testPass,
        testDomain, BTSRealm);
};