Add default value to non-optional DefaultsKeys
This commit is contained in:
parent
5eb8ce5bb0
commit
e06413b348
2 changed files with 10 additions and 16 deletions
|
|
@ -31,17 +31,17 @@ public extension DefaultsKeys {
|
||||||
|
|
||||||
static let lastSyncedTime = DefaultsKey<Date?>("lastSyncedTime")
|
static let lastSyncedTime = DefaultsKey<Date?>("lastSyncedTime")
|
||||||
|
|
||||||
static let isTouchIDOn = DefaultsKey<Bool>("isTouchIDOn")
|
static let isTouchIDOn = DefaultsKey<Bool>("isTouchIDOn", defaultValue: false)
|
||||||
static let passcodeKey = DefaultsKey<String?>("passcodeKey")
|
static let passcodeKey = DefaultsKey<String?>("passcodeKey")
|
||||||
|
|
||||||
static let isHideUnknownOn = DefaultsKey<Bool>("isHideUnknownOn")
|
static let isHideUnknownOn = DefaultsKey<Bool>("isHideUnknownOn", defaultValue: false)
|
||||||
static let isHideOTPOn = DefaultsKey<Bool>("isHideOTPOn")
|
static let isHideOTPOn = DefaultsKey<Bool>("isHideOTPOn", defaultValue: false)
|
||||||
static let isRememberPGPPassphraseOn = DefaultsKey<Bool>("isRememberPGPPassphraseOn")
|
static let isRememberPGPPassphraseOn = DefaultsKey<Bool>("isRememberPGPPassphraseOn", defaultValue: false)
|
||||||
static let isRememberGitCredentialPassphraseOn = DefaultsKey<Bool>("isRememberGitCredentialPassphraseOn")
|
static let isRememberGitCredentialPassphraseOn = DefaultsKey<Bool>("isRememberGitCredentialPassphraseOn", defaultValue: false)
|
||||||
static let isShowFolderOn = DefaultsKey<Bool>("isShowFolderOn")
|
static let isShowFolderOn = DefaultsKey<Bool>("isShowFolderOn", defaultValue: true)
|
||||||
static let isHidePasswordImagesOn = DefaultsKey<Bool>("isHidePasswordImagesOn")
|
static let isHidePasswordImagesOn = DefaultsKey<Bool>("isHidePasswordImagesOn", defaultValue: false)
|
||||||
static let isSearchDefaultAll = DefaultsKey<Bool>("isSearchDefaultAll")
|
static let isSearchDefaultAll = DefaultsKey<Bool>("isSearchDefaultAll", defaultValue: true)
|
||||||
static let passwordGeneratorFlavor = DefaultsKey<String>("passwordGeneratorFlavor")
|
static let passwordGeneratorFlavor = DefaultsKey<String>("passwordGeneratorFlavor", defaultValue: "Apple")
|
||||||
|
|
||||||
static let encryptInArmored = DefaultsKey<Bool>("encryptInArmored")
|
static let encryptInArmored = DefaultsKey<Bool>("encryptInArmored", defaultValue: false)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,12 +12,6 @@ import XCTest
|
||||||
|
|
||||||
class PasswordTest: XCTestCase {
|
class PasswordTest: XCTestCase {
|
||||||
|
|
||||||
override static func setUp() {
|
|
||||||
super.setUp()
|
|
||||||
SharedDefaults[.isHideUnknownOn] = false
|
|
||||||
SharedDefaults[.isHideOTPOn] = false
|
|
||||||
}
|
|
||||||
|
|
||||||
func testUrl() {
|
func testUrl() {
|
||||||
let password = getPasswordObjectWith(content: "")
|
let password = getPasswordObjectWith(content: "")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue