|
|
@ -15,8 +15,7 @@ class TrackingProtectionPanelInteractorTest {
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
fun openDetails() {
|
|
|
|
fun openDetails() {
|
|
|
|
val store: TrackingProtectionStore = mockk(relaxed = true)
|
|
|
|
val store: TrackingProtectionStore = mockk(relaxed = true)
|
|
|
|
val interactor =
|
|
|
|
val interactor = TrackingProtectionPanelInteractor(store, {}, {})
|
|
|
|
TrackingProtectionPanelInteractor(store, mockk(), mockk())
|
|
|
|
|
|
|
|
interactor.openDetails(TrackingProtectionCategory.FINGERPRINTERS, true)
|
|
|
|
interactor.openDetails(TrackingProtectionCategory.FINGERPRINTERS, true)
|
|
|
|
verify {
|
|
|
|
verify {
|
|
|
|
store.dispatch(
|
|
|
|
store.dispatch(
|
|
|
@ -32,7 +31,7 @@ class TrackingProtectionPanelInteractorTest {
|
|
|
|
fun openDetailsForRedirectTrackers() {
|
|
|
|
fun openDetailsForRedirectTrackers() {
|
|
|
|
val store: TrackingProtectionStore = mockk(relaxed = true)
|
|
|
|
val store: TrackingProtectionStore = mockk(relaxed = true)
|
|
|
|
val interactor =
|
|
|
|
val interactor =
|
|
|
|
TrackingProtectionPanelInteractor(store, mockk(), mockk())
|
|
|
|
TrackingProtectionPanelInteractor(store, {}, {})
|
|
|
|
interactor.openDetails(TrackingProtectionCategory.REDIRECT_TRACKERS, true)
|
|
|
|
interactor.openDetails(TrackingProtectionCategory.REDIRECT_TRACKERS, true)
|
|
|
|
verify {
|
|
|
|
verify {
|
|
|
|
store.dispatch(
|
|
|
|
store.dispatch(
|
|
|
@ -49,7 +48,7 @@ class TrackingProtectionPanelInteractorTest {
|
|
|
|
var openSettings = false
|
|
|
|
var openSettings = false
|
|
|
|
val interactor = TrackingProtectionPanelInteractor(
|
|
|
|
val interactor = TrackingProtectionPanelInteractor(
|
|
|
|
mockk(),
|
|
|
|
mockk(),
|
|
|
|
mockk(),
|
|
|
|
{ },
|
|
|
|
{ openSettings = true }
|
|
|
|
{ openSettings = true }
|
|
|
|
)
|
|
|
|
)
|
|
|
|
interactor.selectTrackingProtectionSettings()
|
|
|
|
interactor.selectTrackingProtectionSettings()
|
|
|
@ -72,7 +71,7 @@ class TrackingProtectionPanelInteractorTest {
|
|
|
|
fun onBackPressed() {
|
|
|
|
fun onBackPressed() {
|
|
|
|
val store: TrackingProtectionStore = mockk(relaxed = true)
|
|
|
|
val store: TrackingProtectionStore = mockk(relaxed = true)
|
|
|
|
val interactor =
|
|
|
|
val interactor =
|
|
|
|
TrackingProtectionPanelInteractor(store, mockk(), mockk())
|
|
|
|
TrackingProtectionPanelInteractor(store, {}, {})
|
|
|
|
interactor.onBackPressed()
|
|
|
|
interactor.onBackPressed()
|
|
|
|
verify { store.dispatch(TrackingProtectionAction.ExitDetailsMode) }
|
|
|
|
verify { store.dispatch(TrackingProtectionAction.ExitDetailsMode) }
|
|
|
|
}
|
|
|
|
}
|
|
|
|