BackgroundSyncChoiceTest.kt

870 B · raw

1package com.peachpasswords.ui.pairing23import org.junit.Assert.assertEquals4import org.junit.Assert.assertFalse5import org.junit.Assert.assertTrue6import org.junit.Test78class BackgroundSyncChoiceTest {9    @Test fun `successful pairing prompts before navigation`() {10        assertTrue(shouldPromptForBackgroundSync(pairingSucceeded = true))11        assertFalse(shouldPromptForBackgroundSync(pairingSucceeded = false))12    }1314    @Test fun `back uses the recommended background default`() {15        assertEquals(true, backgroundSyncChoice(BackgroundSyncAction.DISMISS))16    }1718    @Test fun `secondary action selects manual sync`() {19        assertEquals(false, backgroundSyncChoice(BackgroundSyncAction.MANUAL_ONLY))20    }2122    @Test fun `primary action selects background sync`() {23        assertEquals(true, backgroundSyncChoice(BackgroundSyncAction.ALLOW))24    }25}