summaryrefslogtreecommitdiff
path: root/app/src/androidTest/java
diff options
context:
space:
mode:
authorHarsh Shandilya <msfjarvis@gmail.com>2020-07-14 11:31:37 +0530
committerGitHub <noreply@github.com>2020-07-14 11:31:37 +0530
commit7f3aceaf11ce69a121ea0d9bd62e38953184e40c (patch)
tree8a1053517e07f4ddef077804e57df7a4e7675507 /app/src/androidTest/java
parent5d60f1304f5bf3ac8cc86880af6e68f45673ed8e (diff)
Fix navigation bar theming and reformat (#930)
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"
}
}