Finalized TLV test case

This commit is contained in:
2015-05-01 13:44:43 +02:00
parent 93379a328d
commit 9b2e38d7c3
+5 -1
View File
@@ -189,9 +189,13 @@ describe('PDU convertion', function() {
assert( ! err, 'Error should be negative'); assert( ! err, 'Error should be negative');
larvitsmpp.utils.pduToObj(pduBuf, function(err, pduObj2) { larvitsmpp.utils.pduToObj(pduBuf, function(err, pduObj2) {
var unknownTlvBuf = new Buffer(pduObj2.tlvs['5142'].tagValue, 'hex');
assert( ! err, 'Error should be negative'); assert( ! err, 'Error should be negative');
console.log(pduObj2); assert(pduObj2.tlvs.receipted_message_id !== undefined, 'TLV receipted_message_id should not be undefined');
assert(pduObj2.tlvs.receipted_message_id.tagValue === '293f293', 'receipted_message_id should match the given one');
assert(unknownTlvBuf.toString('ascii') === 'blajfoo', 'Unknown TLV 5142 should have a valid buffer');
done(); done();
}); });