mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-29 13:27:46 +00:00
app: update GpgIdentifier tests
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
2fab258bc0
commit
a57c013619
@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
package dev.msfjarvis.aps.util.crypto
|
package dev.msfjarvis.aps.util.crypto
|
||||||
|
|
||||||
import kotlin.test.Ignore
|
|
||||||
import kotlin.test.Test
|
import kotlin.test.Test
|
||||||
import kotlin.test.assertNotNull
|
import kotlin.test.assertNotNull
|
||||||
import kotlin.test.assertTrue
|
import kotlin.test.assertTrue
|
||||||
@ -28,15 +27,14 @@ class GpgIdentifierTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `parses email as user id`() {
|
fun `parses email as user id`() {
|
||||||
val identifier = GpgIdentifier.fromString("aps@msfjarvis.dev")
|
val identifier = GpgIdentifier.fromString("john.doe@example.org")
|
||||||
assertNotNull(identifier)
|
assertNotNull(identifier)
|
||||||
assertTrue { identifier is GpgIdentifier.UserId }
|
assertTrue { identifier is GpgIdentifier.UserId }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Ignore("OpenKeychain can't yet handle these so we don't either")
|
fun `parses user@host without TLD`() {
|
||||||
fun `parses non-email user id`() {
|
val identifier = GpgIdentifier.fromString("john.doe@example")
|
||||||
val identifier = GpgIdentifier.fromString("john.doe")
|
|
||||||
assertNotNull(identifier)
|
assertNotNull(identifier)
|
||||||
assertTrue { identifier is GpgIdentifier.UserId }
|
assertTrue { identifier is GpgIdentifier.UserId }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user