Refactor core data classes (#671)
This commit is contained in:
parent
ab453580ad
commit
d1de81d919
24 changed files with 605 additions and 433 deletions
|
|
@ -11,7 +11,6 @@ import XCTest
|
|||
@testable import passKit
|
||||
|
||||
let PASSWORD_PATH = "/path/to/password"
|
||||
let PASSWORD_URL = URL(fileURLWithPath: "/path/to/password")
|
||||
let PASSWORD_STRING = "abcd1234"
|
||||
let TOTP_URL = "otpauth://totp/email@email.com?secret=abcd1234"
|
||||
let STEAM_TOTP_URL = "otpauth://totp/username?secret=12345678901234567890&issuer=Steam&algorithm=SHA1&digits=5&period=30&representation=steamguard"
|
||||
|
|
@ -30,8 +29,8 @@ let TOTP_URL_FIELD = "otpauth" => "//totp/email@email.com?secret=abcd1234"
|
|||
let MULTILINE_BLOCK_START = "multiline block" => "|"
|
||||
let MULTILINE_LINE_START = "multiline line" => ">"
|
||||
|
||||
func getPasswordObjectWith(content: String, url: URL? = nil) -> Password {
|
||||
Password(name: "password", url: url ?? PASSWORD_URL, plainText: content)
|
||||
func getPasswordObjectWith(content: String, path: String? = nil) -> Password {
|
||||
Password(name: "password", path: path ?? PASSWORD_PATH, plainText: content)
|
||||
}
|
||||
|
||||
func assertDefaults(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue