Move refresh prekeys out of SignalProtocolStore

Use an event/listener instead

// FREEBIE
This commit is contained in:
lilia 2017-05-22 15:24:24 -07:00 committed by Scott Nonnenberg
parent 681418cf6b
commit 16f3717824
3 changed files with 10 additions and 22 deletions

View file

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