aboutsummaryrefslogtreecommitdiff
path: root/app/src/androidTest/java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/androidTest/java')
-rw-r--r--app/src/androidTest/java/com/zeapo/pwdstore/StrictDomainRegexTest.kt3
-rw-r--r--app/src/androidTest/java/com/zeapo/pwdstore/git/GitServerConfigActivityTest.kt2
-rw-r--r--app/src/androidTest/java/com/zeapo/pwdstore/utils/UriTotpFinderTest.kt3
3 files changed, 5 insertions, 3 deletions
diff --git a/app/src/androidTest/java/com/zeapo/pwdstore/StrictDomainRegexTest.kt b/app/src/androidTest/java/com/zeapo/pwdstore/StrictDomainRegexTest.kt
index 1e2d4a6c..2631cb41 100644
--- a/app/src/androidTest/java/com/zeapo/pwdstore/StrictDomainRegexTest.kt
+++ b/app/src/androidTest/java/com/zeapo/pwdstore/StrictDomainRegexTest.kt
@@ -4,15 +4,16 @@
*/
package com.zeapo.pwdstore
-import org.junit.Test
import kotlin.test.assertFalse
import kotlin.test.assertNull
import kotlin.test.assertTrue
+import org.junit.Test
private infix fun String.matchedForDomain(domain: String) =
SearchableRepositoryViewModel.generateStrictDomainRegex(domain)?.containsMatchIn(this) == true
class StrictDomainRegexTest {
+
@Test fun acceptsLiteralDomain() {
assertTrue("work/example.org/john.doe@example.org.gpg" matchedForDomain "example.org")
assertTrue("example.org/john.doe@example.org.gpg" matchedForDomain "example.org")
diff --git a/app/src/androidTest/java/com/zeapo/pwdstore/git/GitServerConfigActivityTest.kt b/app/src/androidTest/java/com/zeapo/pwdstore/git/GitServerConfigActivityTest.kt
index 143cfe1b..2c2691b1 100644
--- a/app/src/androidTest/java/com/zeapo/pwdstore/git/GitServerConfigActivityTest.kt
+++ b/app/src/androidTest/java/com/zeapo/pwdstore/git/GitServerConfigActivityTest.kt
@@ -17,11 +17,11 @@ import androidx.test.rule.ActivityTestRule
import com.google.android.material.button.MaterialButtonToggleGroup
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.git.BaseGitActivity.GitUpdateUrlResult
+import kotlin.test.assertEquals
import org.hamcrest.Matcher
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
-import kotlin.test.assertEquals
@RunWith(AndroidJUnit4::class)
class GitServerConfigActivityTest {
diff --git a/app/src/androidTest/java/com/zeapo/pwdstore/utils/UriTotpFinderTest.kt b/app/src/androidTest/java/com/zeapo/pwdstore/utils/UriTotpFinderTest.kt
index 3397ed0d..8a836f89 100644
--- a/app/src/androidTest/java/com/zeapo/pwdstore/utils/UriTotpFinderTest.kt
+++ b/app/src/androidTest/java/com/zeapo/pwdstore/utils/UriTotpFinderTest.kt
@@ -5,8 +5,8 @@
package com.zeapo.pwdstore.utils
-import org.junit.Test
import kotlin.test.assertEquals
+import org.junit.Test
class UriTotpFinderTest {
@@ -34,6 +34,7 @@ class UriTotpFinderTest {
}
companion object {
+
const val TOTP_URI = "otpauth://totp/ACME%20Co:john@example.com?secret=HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ&issuer=ACME%20Co&algorithm=SHA256&digits=12&period=25"
}
}