diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2021-07-17 03:13:16 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-17 03:13:16 +0530 |
commit | 921e9f96b9bec5e2bf8633947792d6991956507f (patch) | |
tree | 6de848fc6edaf962b71277e704519cd90bcd0b8e /app/src/test | |
parent | fd6d0e52fc378eefd3de35bc9e7778897ccc396f (diff) |
Refactor TOTP implementation and expand SteamGuard hacks (#1460)
* UriTotpFinder: commonize query parameter handling
* gitignore: add more IDEA files
* TotpFinder: add `findIssuer`
* PasswordEntry: don't eagerly fetch TOTP related fields
* format-common: expand SteamGuard workaround
* CHANGELOG: add SteamGuard workaround
Diffstat (limited to 'app/src/test')
-rw-r--r-- | app/src/test/java/dev/msfjarvis/aps/util/totp/UriTotpFinderTest.kt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/src/test/java/dev/msfjarvis/aps/util/totp/UriTotpFinderTest.kt b/app/src/test/java/dev/msfjarvis/aps/util/totp/UriTotpFinderTest.kt index f04913a1..37cbef2f 100644 --- a/app/src/test/java/dev/msfjarvis/aps/util/totp/UriTotpFinderTest.kt +++ b/app/src/test/java/dev/msfjarvis/aps/util/totp/UriTotpFinderTest.kt @@ -45,6 +45,12 @@ class UriTotpFinderTest { assertEquals("SHA256", totpFinder.findAlgorithm(PASS_FILE_CONTENT)) } + @Test + fun findIssuer() { + assertEquals("ACME Co", totpFinder.findIssuer(TOTP_URI)) + assertEquals("ACME Co", totpFinder.findIssuer(PASS_FILE_CONTENT)) + } + companion object { const val TOTP_URI = |