aboutsummaryrefslogblamecommitdiffstats
path: root/tests/test-password.js
blob: e46ed9c911c826f08291a6a47ff5a79ef646dcc7 (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                                                                                                                                                                                                                             

                                                   


                                                   
                                            

                              
/*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);
};