|
|
@ -91,21 +91,9 @@ describe("SignalProtocolStore", function() {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
describe('removePreKey', function() {
|
|
|
|
describe('removePreKey', function() {
|
|
|
|
var oldGetAccountManager;
|
|
|
|
|
|
|
|
before(function(done) {
|
|
|
|
before(function(done) {
|
|
|
|
oldGetAccountManager = window.getAccountManager;
|
|
|
|
|
|
|
|
window.getAccountManager = function() {
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
refreshPreKeys: function() {
|
|
|
|
|
|
|
|
return Promise.resolve();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
store.storePreKey(2, testKey).then(done);
|
|
|
|
store.storePreKey(2, testKey).then(done);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
after(function() {
|
|
|
|
|
|
|
|
window.getAccountManager = oldGetAccountManager;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
it('deletes prekeys', function(done) {
|
|
|
|
it('deletes prekeys', function(done) {
|
|
|
|
store.removePreKey(2, testKey).then(function() {
|
|
|
|
store.removePreKey(2, testKey).then(function() {
|
|
|
|
return store.loadPreKey(2).then(function(key) {
|
|
|
|
return store.loadPreKey(2).then(function(key) {
|
|
|
|