mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-20 14:00:03 +03:00
Fix test
This commit is contained in:
parent
6a3f5a50d9
commit
7857339f54
1 changed files with 6 additions and 0 deletions
|
@ -80,6 +80,12 @@ class DefaultVectorAnalyticsTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `when revoking consent to analytics then updates posthog opt out to true and closes Sentry`() = runTest {
|
fun `when revoking consent to analytics then updates posthog opt out to true and closes Sentry`() = runTest {
|
||||||
|
// For opt-out to have effect on Posthog, it has to be used first, so it has to be opt-in first
|
||||||
|
fakeAnalyticsStore.givenUserContent(consent = true)
|
||||||
|
fakePostHog.verifyOptOutStatus(optedOut = false)
|
||||||
|
fakeSentryAnalytics.verifySentryInit()
|
||||||
|
|
||||||
|
// Then test opt-out
|
||||||
fakeAnalyticsStore.givenUserContent(consent = false)
|
fakeAnalyticsStore.givenUserContent(consent = false)
|
||||||
|
|
||||||
fakePostHog.verifyOptOutStatus(optedOut = true)
|
fakePostHog.verifyOptOutStatus(optedOut = true)
|
||||||
|
|
Loading…
Add table
Reference in a new issue