Fix a test
Set the timestamp on the record to current time to ensure that nonblockingApproval will be required. // FREEBIE
This commit is contained in:
parent
f15fadbb4d
commit
5d5805526a
1 changed files with 5 additions and 1 deletions
|
@ -182,11 +182,15 @@ describe("SignalProtocolStore", function() {
|
|||
record.save({ firstUse: false }).then(function() { done(); });
|
||||
});
|
||||
describe('If nonblocking approval is required', function() {
|
||||
var now = Date.now();
|
||||
before(function(done) {
|
||||
record.save({ timestamp: now }).then(function() { done(); });
|
||||
});
|
||||
it('sets non-blocking approval', function(done) {
|
||||
store.saveIdentity(identifier, testKey.pubKey, true).then(function() {
|
||||
record.fetch().then(function() {
|
||||
assert.strictEqual(record.get('nonblockingApproval'), true);
|
||||
assert.strictEqual(record.get('timestamp'), oldTimestamp);
|
||||
assert.strictEqual(record.get('timestamp'), now);
|
||||
assert.strictEqual(record.get('firstUse'), false);
|
||||
done();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue