feat: harden offline sync and add diagnostics
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package pl.firmatpp.kierowca.data.sync
|
||||
|
||||
import org.junit.Assert.assertFalse
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
|
||||
class NetworkMonitorTest {
|
||||
@Test
|
||||
fun captivePortalIsNotTreatedAsOnline() {
|
||||
assertFalse(hasValidatedInternetCapabilities(hasInternet = true, hasValidated = false))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun validatedInternetIsOnline() {
|
||||
assertTrue(hasValidatedInternetCapabilities(hasInternet = true, hasValidated = true))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user