mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
more coverage
This commit is contained in:
+3
-2
@@ -225,7 +225,7 @@ class DefaultBugReporterTest {
|
|||||||
val sut = DefaultBugReporter(
|
val sut = DefaultBugReporter(
|
||||||
context = RuntimeEnvironment.getApplication(),
|
context = RuntimeEnvironment.getApplication(),
|
||||||
screenshotHolder = FakeScreenshotHolder(),
|
screenshotHolder = FakeScreenshotHolder(),
|
||||||
crashDataStore = FakeCrashDataStore(),
|
crashDataStore = FakeCrashDataStore("I did crash", true),
|
||||||
coroutineDispatchers = testCoroutineDispatchers(),
|
coroutineDispatchers = testCoroutineDispatchers(),
|
||||||
okHttpClient = { OkHttpClient.Builder().build() },
|
okHttpClient = { OkHttpClient.Builder().build() },
|
||||||
userAgentProvider = DefaultUserAgentProvider(buildMeta, FakeSdkMetadata("123456789")),
|
userAgentProvider = DefaultUserAgentProvider(buildMeta, FakeSdkMetadata("123456789")),
|
||||||
@@ -247,10 +247,11 @@ class DefaultBugReporterTest {
|
|||||||
val request = server.takeRequest()
|
val request = server.takeRequest()
|
||||||
|
|
||||||
val foundValues = collectValuesFromFormData(request)
|
val foundValues = collectValuesFromFormData(request)
|
||||||
|
println("## FOUND VALUES $foundValues")
|
||||||
assertThat(foundValues["device_keys"]).isNull()
|
assertThat(foundValues["device_keys"]).isNull()
|
||||||
assertThat(foundValues["device_id"]).isEqualTo("undefined")
|
assertThat(foundValues["device_id"]).isEqualTo("undefined")
|
||||||
assertThat(foundValues["user_id"]).isEqualTo("undefined")
|
assertThat(foundValues["user_id"]).isEqualTo("undefined")
|
||||||
server.shutdown()
|
assertThat(foundValues["label"]).isEqualTo("crash")
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun collectValuesFromFormData(request: RecordedRequest): HashMap<String, String> {
|
private fun collectValuesFromFormData(request: RecordedRequest): HashMap<String, String> {
|
||||||
|
|||||||
Reference in New Issue
Block a user