|
|
@ -312,13 +312,15 @@ class OfflineFirstNewsRepositoryTest {
|
|
|
|
|
|
|
|
|
|
|
|
subject.syncWith(synchronizer)
|
|
|
|
subject.syncWith(synchronizer)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
val followedNewsResourcesFromNetwork = networkNewsResources
|
|
|
|
|
|
|
|
.filter { (it.topics intersect followedTopicIds).isNotEmpty() }
|
|
|
|
|
|
|
|
.map(NetworkNewsResource::id)
|
|
|
|
|
|
|
|
.sorted()
|
|
|
|
|
|
|
|
|
|
|
|
// Notifier should have been called with only news resources that have topics
|
|
|
|
// Notifier should have been called with only news resources that have topics
|
|
|
|
// that the user follows
|
|
|
|
// that the user follows
|
|
|
|
assertEquals(
|
|
|
|
assertEquals(
|
|
|
|
expected = networkNewsResources
|
|
|
|
expected = followedNewsResourcesFromNetwork,
|
|
|
|
.filter { (it.topics intersect followedTopicIds).isNotEmpty() }
|
|
|
|
|
|
|
|
.map(NetworkNewsResource::id)
|
|
|
|
|
|
|
|
.sorted(),
|
|
|
|
|
|
|
|
actual = notifier.addedNewsResources.first().map(NewsResource::id).sorted(),
|
|
|
|
actual = notifier.addedNewsResources.first().map(NewsResource::id).sorted(),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|