Add sanity tests for oracledb.events

This commit is contained in:
Christopher Jones 2018-03-27 16:48:46 +11:00
parent 04af720c34
commit 67804fd21b
2 changed files with 21 additions and 0 deletions

View File

@ -930,6 +930,8 @@ Overview of node-oracledb functional tests
58.1.26 oracleClientVersionString (read-only)
58.1.27 edition
58.1.28 Negative - edition
58.1.29 events
58.1.30 Negative - events
58.2 Pool Class
58.2.1 poolMin
58.2.2 poolMax

View File

@ -59,6 +59,7 @@ describe('58. properties.js', function() {
defaultValues.poolPingInterval = oracledb.poolPingInterval;
defaultValues.fetchAsBuffer = oracledb.fetchAsBuffer;
defaultValues.edition = oracledb.edition;
defaultValues.events = oracledb.events;
});
after('restore the values', function() {
@ -80,6 +81,7 @@ describe('58. properties.js', function() {
oracledb.poolPingInterval = defaultValues.poolPingInterval;
oracledb.fetchAsBuffer = defaultValues.fetchAsBuffer;
oracledb.edition = defaultValues.edition;
oracledb.events = defaultValues.events;
});
it('58.1.1 poolMin', function() {
@ -334,6 +336,23 @@ describe('58. properties.js', function() {
);
});
it('58.1.29 events', function() {
var t = oracledb.events;
oracledb.events = true;
should.strictEqual(t, false);
should.strictEqual(oracledb.events, true);
});
it('58.1.30 Negative - events', function() {
should.throws(
function() {
oracledb.events = 'hello';
},
/NJS-004: invalid value for property events/
);
});
}); // 58.1
describe('58.2 Pool Class', function() {