Feed syncing (#1044)
Closes #1036 Also: - Store sync info for feeds more compactly. Address #1037
This commit is contained in:
parent
451c12513e
commit
dd8fd2b1ac
7 changed files with 112 additions and 52 deletions
|
@ -200,17 +200,18 @@ describe("Zotero.Feed", function() {
|
|||
});
|
||||
|
||||
describe("#storeSyncedSettings", function() {
|
||||
it("should store updated settings for the feed", function* () {
|
||||
let settings = {
|
||||
name: Zotero.Utilities.randomString(),
|
||||
url: 'http://' + Zotero.Utilities.randomString().toLowerCase() + '.com/feed.rss',
|
||||
refreshInterval: 1,
|
||||
cleanupAfter: 1
|
||||
};
|
||||
let feed = yield createFeed(settings);
|
||||
it("should store settings for feed in compact format", function* () {
|
||||
let url = 'http://' + Zotero.Utilities.randomString().toLowerCase() + '.com/feed.rss';
|
||||
let settings = [Zotero.Utilities.randomString(), 1, 1];
|
||||
let feed = yield createFeed({
|
||||
url,
|
||||
name: settings[0],
|
||||
cleanupAfter: settings[1],
|
||||
refreshInterval: settings[2]
|
||||
});
|
||||
|
||||
let syncedFeeds = Zotero.SyncedSettings.get(Zotero.Libraries.userLibraryID, 'feeds');
|
||||
assert.deepEqual(syncedFeeds[feed.url], settings);
|
||||
assert.deepEqual(syncedFeeds[url], settings);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue