Skip to content

Commit ef65542

Browse files
committed
chore: fix tests
1 parent d7b2fea commit ef65542

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

firefox-ios/firefox-ios-tests/Tests/ClientTests/Autofill/LoginListViewModelTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class LoginListViewModelTests: XCTestCase {
8181
)
8282

8383
// Simulate tapping a login cell
84-
viewModel.onLoginCellTap(EncryptedLogin(
84+
viewModel.onLoginCellTap(Login(
8585
credentials: URLCredential(
8686
user: "test",
8787
password: "doubletest",

firefox-ios/firefox-ios-tests/Tests/ClientTests/Coordinators/CredentialAutofillCoordinatorTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
// $0 is UIHostingController<LoginAutofillView>
111111
// }) as? UIHostingController<LoginAutofillView> {
112112
// hostingViewController.rootView.viewModel.onLoginCellTap(
113-
// EncryptedLogin(
113+
// Login(
114114
// credentials: URLCredential(
115115
// user: "test",
116116
// password: "doubletest",

firefox-ios/firefox-ios-tests/Tests/ClientTests/PasswordManagerSelectionHelperTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import MozillaAppServices
88

99
class PasswordManagerSelectionHelperTests: XCTestCase {
1010
private var selectionHelper: PasswordManagerSelectionHelper!
11-
private let loginRecord = EncryptedLogin(
11+
private let loginRecord = Login(
1212
credentials: URLCredential(
1313
user: "test",
1414
password: "doubletest",
@@ -57,7 +57,7 @@ class PasswordManagerSelectionHelperTests: XCTestCase {
5757
}
5858

5959
func testRemoveAllCell() {
60-
let loginRecord2 = EncryptedLogin(
60+
let loginRecord2 = Login(
6161
credentials: URLCredential(user: "filippo", password: "testtest", persistence: .permanent),
6262
protectionSpace: URLProtectionSpace.fromOrigin("https://testtest.com")
6363
)

firefox-ios/firefox-ios-tests/Tests/StorageTests/RustLoginsTests.swift

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,24 +75,21 @@ class RustLoginsTests: XCTestCase {
7575
XCTAssertEqual(login!.id, addResult.successValue!)
7676

7777
let updatedLogin = LoginEntry(
78-
fromLoginEntryFlattened: LoginEntryFlattened(
79-
id: "",
80-
hostname: login!.hostname,
81-
password: "password2",
82-
username: "",
78+
origin: login!.hostname,
8379
httpRealm: login!.httpRealm,
84-
formSubmitUrl: login!.formSubmitUrl,
80+
formActionOrigin: login!.formSubmitUrl,
8581
usernameField: login!.usernameField,
86-
passwordField: login!.passwordField
87-
)
82+
passwordField: login!.passwordField,
83+
password: "password2",
84+
username: ""
8885
)
8986

9087
let updateResult = logins.updateLogin(id: login!.id, login: updatedLogin).value
9188
XCTAssertTrue(updateResult.isSuccess)
9289
let getResult2 = logins.getLogin(id: login!.id).value
9390
XCTAssertTrue(getResult2.isSuccess)
9491
XCTAssertNotNil(getResult2.successValue!)
95-
let password = getResult2.successValue!!.decryptedPassword
92+
let password = getResult2.successValue!!.password
9693
XCTAssertEqual(password, "password2")
9794
}
9895

0 commit comments

Comments
 (0)