Skip to content

Commit

Permalink
Changed tests to work around URL decoding differences in iOS 17 (#…
Browse files Browse the repository at this point in the history
…2605)

The "invalid" test URLs we were using are no longer invalid on iOS 17.
This fixes those tests by using an `Int` instead of a `String`.

<img width="775" alt="image"
src="https://github.com/RevenueCat/purchases-ios/assets/685609/3ef5ec23-b17d-4ac1-9e4e-4dc48c97f5a9">
  • Loading branch information
NachoSoto authored Jun 9, 2023
1 parent 25c78f8 commit 9494f2e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class DecoderExtensionsIgnoreErrorsTests: TestCase {
}

func testIgnoresErrors() throws {
let json = "{\"url\": \"not a! valid url@\"}"
let json = "{\"url\": 1}"
let data = try Data.decode(json)

expect(data.url).to(beNil())
Expand Down
2 changes: 1 addition & 1 deletion Tests/UnitTests/Purchasing/CustomerInfoTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ class BasicCustomerInfoTests: TestCase {
customerInfo = try CustomerInfo(data: [
"request_date": "2019-08-16T10:30:42Z",
"subscriber": [
"management_url": "this isnt' a URL!",
"management_url": 3, // Invalid URL
"first_seen": "2019-07-17T00:05:54Z",
"subscriptions": [:] as [String: Any],
"other_purchases": [:] as [String: Any],
Expand Down

0 comments on commit 9494f2e

Please sign in to comment.