Use PasswordGeneratorFlavor class to set user defaults and UI elements
This commit is contained in:
parent
857a8f44bf
commit
2d5ca58bd9
6 changed files with 19 additions and 8 deletions
|
|
@ -22,6 +22,11 @@ class PasswordGeneratorFlavourTest: XCTestCase {
|
|||
XCTAssertEqual(PasswordGeneratorFlavour.from(""), PasswordGeneratorFlavour.RANDOM)
|
||||
}
|
||||
|
||||
func testLocalizedName() {
|
||||
XCTAssertEqual(PasswordGeneratorFlavour.APPLE.name, "Apple".localize())
|
||||
XCTAssertEqual(PasswordGeneratorFlavour.RANDOM.name, "Random".localize())
|
||||
}
|
||||
|
||||
func testDefaultLength() {
|
||||
// Ensure properly chosen default length values. So this check no longer needs to be performed in the code.
|
||||
PasswordGeneratorFlavour.allCases.map { $0.defaultLength }.forEach { defaultLength in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue