mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 23:18:27 +02:00
Reduce the number of unnecessary home page reloads
This commit is contained in:
@@ -112,4 +112,35 @@ class RecentsDataSourceSectionsTests: XCTestCase {
|
||||
]
|
||||
)
|
||||
}
|
||||
|
||||
func test_equalsIfSameSectionsInSameOrder() {
|
||||
let original = RecentsDataSourceSections(sectionTypes: [
|
||||
.favorites,
|
||||
.invites,
|
||||
.lowPriority,
|
||||
.searchedRoom,
|
||||
])
|
||||
let sameOrder = RecentsDataSourceSections(sectionTypes: [
|
||||
.favorites,
|
||||
.invites,
|
||||
.lowPriority,
|
||||
.searchedRoom,
|
||||
])
|
||||
let differentOrder = RecentsDataSourceSections(sectionTypes: [
|
||||
.lowPriority,
|
||||
.favorites,
|
||||
.invites,
|
||||
.searchedRoom,
|
||||
])
|
||||
let differentSections = RecentsDataSourceSections(sectionTypes: [
|
||||
.favorites,
|
||||
.serverNotice,
|
||||
.lowPriority,
|
||||
.searchedRoom,
|
||||
])
|
||||
|
||||
XCTAssertEqual(original, sameOrder)
|
||||
XCTAssertNotEqual(original, differentOrder)
|
||||
XCTAssertNotEqual(original, differentSections)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user