Skip to content

Commit

Permalink
iOS 17 snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
NachoSoto committed Jun 8, 2023
1 parent ce47044 commit b3ea3eb
Show file tree
Hide file tree
Showing 101 changed files with 1,697 additions and 5 deletions.
7 changes: 6 additions & 1 deletion Tests/UnitTests/Misc/AnyEncodableTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ class AnyEncodableTests: TestCase {
"d": nil
]

assertSnapshot(matching: AnyEncodable(dictionary), as: .json)
assertSnapshot(
matching: AnyEncodable(dictionary),
as: .json,
// Formatting `Double`s changed in iOS 17
testName: CurrentTestCaseTracker.osVersionAndTestName
)
}

func testEncodingInvalidDataFails() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"a" : 1,
"b" : {
"b1" : false,
"b2" : {
"b21" : 1,
"b22" : "https:\/\/google.com"
},
"b3" : [
20.199999999999999,
19.989999999999998,
5
],
"b4" : 50000
},
"c" : "3",
"d" : null
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"a" : 1,
"b" : {
"b1" : false,
"b2" : {
"b21" : 1,
"b22" : "https:\/\/google.com"
},
"b3" : [
20.199999999999999,
19.989999999999998,
5
],
"b4" : 50000
},
"c" : "3",
"d" : null
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"a" : 1,
"b" : {
"b1" : false,
"b2" : {
"b21" : 1,
"b22" : "https:\/\/google.com"
},
"b3" : [
20.199999999999999,
19.989999999999998,
5
],
"b4" : 50000
},
"c" : "3",
"d" : null
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"a" : 1,
"b" : {
"b1" : false,
"b2" : {
"b21" : 1,
"b22" : "https:\/\/google.com"
},
"b3" : [
20.199999999999999,
19.989999999999998,
5
],
"b4" : 50000
},
"c" : "3",
"d" : null
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"a" : 1,
"b" : {
"b1" : false,
"b2" : {
"b21" : 1,
"b22" : "https:\/\/google.com"
},
"b3" : [
20.2,
19.99,
5
],
"b4" : 50000
},
"c" : "3",
"d" : null
}
5 changes: 1 addition & 4 deletions Tests/UnitTests/Mocks/MockHTTPClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,10 @@ class MockHTTPClient: HTTPClient {
DispatchQueue.main.async {
self.calls.append(call)

let osVersionEquivalent = OSVersionEquivalent.current
let testName = "iOS\(osVersionEquivalent.rawValue)/\(CurrentTestCaseTracker.sanitizedTestName)"

assertSnapshot(matching: call,
as: .formattedJson,
file: self.sourceTestFile,
testName: testName)
testName: CurrentTestCaseTracker.osVersionAndTestName)

let mock = self.mocks[request.path] ?? .init(statusCode: .success)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"headers" : {
"Authorization" : "Bearer asharedsecret"
},
"request" : {
"body" : null,
"method" : "GET",
"url" : "https://api.revenuecat.com/v1/subscribers/user"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"headers" : {
"Authorization" : "Bearer asharedsecret"
},
"request" : {
"body" : null,
"method" : "GET",
"url" : "https://api.revenuecat.com/v1/subscribers/user"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"headers" : {
"Authorization" : "Bearer asharedsecret"
},
"request" : {
"body" : null,
"method" : "GET",
"url" : "https://api.revenuecat.com/v1/subscribers/user_id_2"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"headers" : {
"Authorization" : "Bearer asharedsecret"
},
"request" : {
"body" : null,
"method" : "GET",
"url" : "https://api.revenuecat.com/v1/subscribers/userid%20with%20spaces"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"headers" : {
"Authorization" : "Bearer asharedsecret"
},
"request" : {
"body" : null,
"method" : "GET",
"url" : "https://api.revenuecat.com/v1/subscribers/user"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"headers" : {
"Authorization" : "Bearer asharedsecret"
},
"request" : {
"body" : null,
"method" : "GET",
"url" : "https://api.revenuecat.com/v1/subscribers/user"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"headers" : {
"Authorization" : "Bearer asharedsecret"
},
"request" : {
"body" : null,
"method" : "GET",
"url" : "https://api.revenuecat.com/v1/subscribers/user"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"headers" : {
"Authorization" : "Bearer asharedsecret"
},
"request" : {
"body" : null,
"method" : "GET",
"url" : "https://api.revenuecat.com/v1/subscribers/user"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"headers" : {
"Authorization" : "Bearer asharedsecret"
},
"request" : {
"body" : null,
"method" : "GET",
"url" : "https://api.revenuecat.com/v1/subscribers/user"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"headers" : {
"Authorization" : "Bearer asharedsecret"
},
"request" : {
"body" : null,
"method" : "GET",
"url" : "https://api.revenuecat.com/v1/subscribers/user"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"headers" : {
"Authorization" : "Bearer asharedsecret"
},
"request" : {
"body" : null,
"method" : "GET",
"url" : "https://api.revenuecat.com/v1/subscribers/user"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"headers" : {
"Authorization" : "Bearer asharedsecret",
"X-Nonce" : "MTIzNDU2Nzg5MGFi"
},
"request" : {
"body" : null,
"method" : "GET",
"url" : "https://api.revenuecat.com/v1/subscribers/user"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"headers" : {
"Authorization" : "Bearer asharedsecret"
},
"request" : {
"body" : null,
"method" : "GET",
"url" : "https://api.revenuecat.com/v1/subscribers/user"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"headers" : {
"Authorization" : "Bearer asharedsecret"
},
"request" : {
"body" : {
"fetch_token" : "AQI=",
"product_identifiers" : [
"producta",
"productb",
"productc"
]
},
"method" : "POST",
"url" : "https://api.revenuecat.com/v1/subscribers/user/intro_eligibility"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"headers" : {
"Authorization" : "Bearer asharedsecret"
},
"request" : {
"body" : {
"fetch_token" : "AQI=",
"product_identifiers" : [
"producta",
"productb",
"productc"
]
},
"method" : "POST",
"url" : "https://api.revenuecat.com/v1/subscribers/user/intro_eligibility"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"headers" : {
"Authorization" : "Bearer asharedsecret"
},
"request" : {
"body" : {
"fetch_token" : "AQID",
"product_identifiers" : [
"producta",
"productb",
"productc",
"productd"
]
},
"method" : "POST",
"url" : "https://api.revenuecat.com/v1/subscribers/user/intro_eligibility"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"headers" : {
"Authorization" : "Bearer asharedsecret"
},
"request" : {
"body" : null,
"method" : "GET",
"url" : "https://api.revenuecat.com/v1/subscribers/user/offerings"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"headers" : {
"Authorization" : "Bearer asharedsecret"
},
"request" : {
"body" : null,
"method" : "GET",
"url" : "https://api.revenuecat.com/v1/subscribers/user_id_2/offerings"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"headers" : {
"Authorization" : "Bearer asharedsecret"
},
"request" : {
"body" : null,
"method" : "GET",
"url" : "https://api.revenuecat.com/v1/subscribers/user/offerings"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"headers" : {
"Authorization" : "Bearer asharedsecret"
},
"request" : {
"body" : null,
"method" : "GET",
"url" : "https://api.revenuecat.com/v1/subscribers/user/offerings"
}
}
Loading

0 comments on commit b3ea3eb

Please sign in to comment.