Things like setNameSync works but not setName or at least it does not work in the sense that I'm able to retrieve the new name within the callback. It will be written to the tellstick.conf.
I have strong suspicions that all similar methods have issues, setProtocol, setModel etc but more testing is needed.
This works and the new name is returned.
it('setNameSync', function(){
var setResult = telldus.setNameSync(deviceId, 'Newly created');
var name = telldus.getNameSync(deviceId);
name.should.equal('Newly created');
setResult.should.equal(true, 'set worked but did still return error');
});
This doesn't work. Even though the call to setName does not generate an error then new name will not be returned by getNameSync.
The assertion that fails is - 'setName did not fail but can not get new values'
it('setName', function(done){
telldus.setName(deviceId, 'Newly created2', function(err){
should.not.exist(err);
var name = telldus.getNameSync(deviceId);
name.should.equal('Newly created2', 'setName did not fail but can not get new values');
done(err);
});
});
Until issue #18 is fixed mocha will report this as a timeout error but if you look carefully at the output you will see the 'setName did not fail but can not get new values'
Things like setNameSync works but not setName or at least it does not work in the sense that I'm able to retrieve the new name within the callback. It will be written to the tellstick.conf.
I have strong suspicions that all similar methods have issues, setProtocol, setModel etc but more testing is needed.
This works and the new name is returned.
This doesn't work. Even though the call to setName does not generate an error then new name will not be returned by getNameSync. The assertion that fails is - 'setName did not fail but can not get new values'
Until issue #18 is fixed mocha will report this as a timeout error but if you look carefully at the output you will see the 'setName did not fail but can not get new values'