Skip to content

Commit 85b2a12

Browse files
committed
test: added test in UnifiedInboxConfiguratorTest to verify that unified inbox is disabled when there is only one account
1 parent 2ac4c83 commit 85b2a12

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

legacy/core/src/test/java/com/fsck/k9/UnifiedInboxConfiguratorTest.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,18 @@ class UnifiedInboxConfiguratorTest {
6767
assertThat(generalSettingsManager.getConfig().display.inboxSettings.isShowUnifiedInbox).isEqualTo(true)
6868
}
6969

70+
@Test
71+
fun `configureUnifiedInbox should disable unified inbox when there is only one account`() {
72+
// Given
73+
`when`(accountManager.getAccounts()).thenReturn(listOf(mock()))
74+
75+
// When
76+
configurator.configureUnifiedInbox()
77+
78+
// Then
79+
assertThat(generalSettingsManager.getConfig().display.inboxSettings.isShowUnifiedInbox).isEqualTo(false)
80+
}
81+
7082
@Test
7183
fun `configureUnifiedInbox should not enable unified inbox when there are less than two accounts`() {
7284
// Given

0 commit comments

Comments
 (0)