Don't run feeds update until after schema update promise

And tweak feed scheduling in general
This commit is contained in:
Dan Stillman 2017-06-19 00:53:08 -04:00
parent 1372949523
commit 7c020da594
3 changed files with 56 additions and 34 deletions

View file

@ -306,11 +306,11 @@ describe("Zotero.Feed", function() {
var modifiedFeedUrl = getTestDataUrl("feedModified.rss");
before(function() {
scheduleNextFeedCheck = sinon.stub(Zotero.Feeds, 'scheduleNextFeedCheck');
scheduleNextFeedCheck = sinon.stub(Zotero.Feeds, 'scheduleNextFeedCheck').resolves();
});
beforeEach(function* (){
scheduleNextFeedCheck.reset();
scheduleNextFeedCheck.resetHistory();
feed = yield createFeed();
feed._feedUrl = feedUrl;
yield feed.updateFeed();
@ -325,12 +325,10 @@ describe("Zotero.Feed", function() {
});
it('should schedule next feed check', function* () {
let feed = yield createFeed();
feed._feedUrl = feedUrl;
yield feed.updateFeed();
assert.equal(scheduleNextFeedCheck.called, true);
});
it('should add new feed items', function* () {