});
});
- it('should grant all privileges to the user', function (done) {
- var sql = "insert into usrpriv (usrpriv_username, usrpriv_priv_id) " +
- "select $1, priv_id " +
- "from priv " +
- "left join usrpriv on priv_id = usrpriv_priv_id and usrpriv_username = $1 " +
- "where usrpriv_id is null";
-
- creds.database = databaseName;
- creds.parameters = [loginData.username];
- datasource.query(sql, creds, function (err, res) {
- assert.isNull(err);
- done();
- });
- });
-
- it('should grant all extensions to the user', function (done) {
- var sql = "insert into xt.usrext (usrext_usr_username, usrext_ext_id) " +
- "select $1, ext_id " +
- "from xt.ext " +
- "left join xt.usrext on ext_id = usrext_ext_id and usrext_usr_username = $1 " +
- "where usrext_id is null";
-
- creds.database = databaseName;
- creds.parameters = [loginData.username];
- datasource.query(sql, creds, function (err, res) {
- assert.isNull(err);
- done();
- });
- });
});
}());