Skip to content

Commit

Permalink
Revert "Fix Failing UnitTests (#1244)"
Browse files Browse the repository at this point in the history
This reverts commit a700593.
  • Loading branch information
stechiu committed Apr 3, 2024
1 parent 5124804 commit e0d960e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/BraintreeCore/BTJSON.swift
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ import Foundation
/// The `BTJSON` as a `URL`
/// - Returns: A `URL` representing the `BTJSON` instance
public func asURL() -> URL? {
guard let urlString = value as? String, urlString.utf8.count == urlString.utf16.count else {
guard let urlString = value as? String else {
return nil
}
return URL(string: urlString)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ class BTSEPADirectDebitClient_Tests: XCTestCase {
]
)

mockWebAuthenticationSession.cannedErrorResponse = NSError(
domain: BTSEPADirectDebitError.errorDomain,
code: BTSEPADirectDebitError.approvalURLInvalid.errorCode,
userInfo: ["Description": "Mock approvalURLInvalid error description."]
)

let sepaDirectDebitClient = BTSEPADirectDebitClient(
apiClient: mockAPIClient,
webAuthenticationSession: mockWebAuthenticationSession,
Expand Down

0 comments on commit e0d960e

Please sign in to comment.