mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Test for WI-33778 Save passphrase checkbox doesn't reflect the actual state
This commit is contained in:
@@ -140,5 +140,25 @@ class PasswordSafeTest {
|
||||
assertThat.isEqualTo(newCredentials.password)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `credentials with empty username`() {
|
||||
if (UsefulTestCase.IS_UNDER_TEAMCITY) {
|
||||
return
|
||||
}
|
||||
|
||||
val settings = PasswordSafeSettings()
|
||||
settings.providerType = ProviderType.KEYCHAIN
|
||||
val ps = PasswordSafeImpl(settings, KeyChainCredentialStore())
|
||||
|
||||
val id = "test PasswordSafeTest.credentials with empty username"
|
||||
val attributes = CredentialAttributes(id, null, null, true)
|
||||
|
||||
val credentials = Credentials(null, "passphrase")
|
||||
ps.set(attributes, credentials)
|
||||
val saved = ps.get(attributes)!!
|
||||
assertThat(saved.password).isEqualTo(credentials.password)
|
||||
assertThat(saved.userName).isNullOrEmpty()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user