From 4aa1afec5a8a54d51960a7d0c9f691137deacb96 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 30 Oct 2024 10:17:16 +0100 Subject: [PATCH] Firebase token: the beginning of the token is always the same, print out the end of it. --- .../pushproviders/firebase/troubleshoot/FirebaseTokenTest.kt | 2 +- .../firebase/troubleshoot/FirebaseTokenTestTest.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/pushproviders/firebase/src/main/kotlin/io/element/android/libraries/pushproviders/firebase/troubleshoot/FirebaseTokenTest.kt b/libraries/pushproviders/firebase/src/main/kotlin/io/element/android/libraries/pushproviders/firebase/troubleshoot/FirebaseTokenTest.kt index a0d6d22d10..0c085e42fb 100644 --- a/libraries/pushproviders/firebase/src/main/kotlin/io/element/android/libraries/pushproviders/firebase/troubleshoot/FirebaseTokenTest.kt +++ b/libraries/pushproviders/firebase/src/main/kotlin/io/element/android/libraries/pushproviders/firebase/troubleshoot/FirebaseTokenTest.kt @@ -48,7 +48,7 @@ class FirebaseTokenTest @Inject constructor( delegate.updateState( description = stringProvider.getString( R.string.troubleshoot_notifications_test_firebase_token_success, - "${token.take(8)}*****" + "*****${token.takeLast(8)}" ), status = NotificationTroubleshootTestState.Status.Success ) diff --git a/libraries/pushproviders/firebase/src/test/kotlin/io/element/android/libraries/pushproviders/firebase/troubleshoot/FirebaseTokenTestTest.kt b/libraries/pushproviders/firebase/src/test/kotlin/io/element/android/libraries/pushproviders/firebase/troubleshoot/FirebaseTokenTestTest.kt index adf50300e7..e67c59c886 100644 --- a/libraries/pushproviders/firebase/src/test/kotlin/io/element/android/libraries/pushproviders/firebase/troubleshoot/FirebaseTokenTestTest.kt +++ b/libraries/pushproviders/firebase/src/test/kotlin/io/element/android/libraries/pushproviders/firebase/troubleshoot/FirebaseTokenTestTest.kt @@ -35,7 +35,7 @@ class FirebaseTokenTestTest { assertThat(awaitItem().status).isEqualTo(NotificationTroubleshootTestState.Status.InProgress) val lastItem = awaitItem() assertThat(lastItem.status).isEqualTo(NotificationTroubleshootTestState.Status.Success) - assertThat(lastItem.description).contains(FAKE_TOKEN.take(8)) + assertThat(lastItem.description).contains(FAKE_TOKEN.takeLast(8)) assertThat(lastItem.description).doesNotContain(FAKE_TOKEN) } }