mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 03:39:05 +01:00
Don't overwrite the list of feeds after fetching.
This commit is contained in:
@@ -103,7 +103,7 @@ public class FeedManagerImplTest extends BrambleMockTestCase {
|
||||
public void testFetchFeedsEmptyList() throws Exception {
|
||||
// The list of feeds is empty
|
||||
expectGetFeeds();
|
||||
expectStoreFeeds();
|
||||
|
||||
feedManager.setTorActive(true);
|
||||
feedManager.fetchFeeds();
|
||||
}
|
||||
@@ -120,7 +120,7 @@ public class FeedManagerImplTest extends BrambleMockTestCase {
|
||||
Feed feed = createFeed(url, blog);
|
||||
|
||||
expectGetFeeds(feed);
|
||||
expectStoreFeeds(feed);
|
||||
expectGetAndStoreFeeds(feed);
|
||||
|
||||
feedManager.setTorActive(true);
|
||||
feedManager.fetchFeeds();
|
||||
@@ -136,7 +136,7 @@ public class FeedManagerImplTest extends BrambleMockTestCase {
|
||||
Feed feed = createFeed(url, blog);
|
||||
|
||||
expectGetFeeds(feed);
|
||||
expectStoreFeeds(feed);
|
||||
expectGetAndStoreFeeds(feed);
|
||||
|
||||
feedManager.setTorActive(true);
|
||||
feedManager.fetchFeeds();
|
||||
@@ -155,7 +155,7 @@ public class FeedManagerImplTest extends BrambleMockTestCase {
|
||||
|
||||
expectGetFeeds(feed);
|
||||
expectUpdateFeedNoEntries(feed);
|
||||
expectStoreFeeds(feed);
|
||||
expectGetAndStoreFeeds(feed);
|
||||
|
||||
feedManager.setTorActive(true);
|
||||
feedManager.fetchFeeds();
|
||||
@@ -176,7 +176,7 @@ public class FeedManagerImplTest extends BrambleMockTestCase {
|
||||
|
||||
expectGetFeeds(feed);
|
||||
expectUpdateFeedOneEntry(feed);
|
||||
expectStoreFeeds(feed);
|
||||
expectGetAndStoreFeeds(feed);
|
||||
|
||||
feedManager.setTorActive(true);
|
||||
feedManager.fetchFeeds();
|
||||
@@ -298,14 +298,6 @@ public class FeedManagerImplTest extends BrambleMockTestCase {
|
||||
}});
|
||||
}
|
||||
|
||||
private void expectStoreFeeds(Feed... feeds) throws Exception {
|
||||
Transaction txn = new Transaction(null, false);
|
||||
context.checking(new DbExpectations() {{
|
||||
oneOf(db).transaction(with(false), withDbRunnable(txn));
|
||||
}});
|
||||
expectStoreFeeds(txn, feeds);
|
||||
}
|
||||
|
||||
private void expectStoreFeeds(Transaction txn, Feed... feeds)
|
||||
throws Exception {
|
||||
BdfList feedList = new BdfList();
|
||||
|
||||
Reference in New Issue
Block a user