Skip to content

Commit 5ae7c16

Browse files
committed
Fix unit tests broken in 1.1 merge
1 parent c4b5bb7 commit 5ae7c16

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

Tests/ApolloTests/Interceptors/MultipartResponseParsingInterceptorTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ final class MultipartResponseParsingInterceptorTests: XCTestCase {
177177

178178
// MARK: Parsing tests
179179

180-
private class Time: MockSelectionSet, SelectionSet {
180+
private class Time: MockSelectionSet {
181181
typealias Schema = MockSchemaMetadata
182182

183183
override class var __selections: [Selection] {[
@@ -225,10 +225,10 @@ final class MultipartResponseParsingInterceptorTests: XCTestCase {
225225
""".crlfFormattedData()
226226
)
227227

228-
let expectedData = Time(data: DataDict([
228+
let expectedData = try Time(data: [
229229
"__typename": "Time",
230230
"ticker": 1
231-
], variables: nil))
231+
], variables: nil)
232232

233233
let expectation = expectation(description: "Multipart data received")
234234

Tests/ApolloTests/RequestChainTests.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ class RequestChainTests: XCTestCase {
330330

331331
// MARK: Memory tests
332332

333-
private class Hero: MockSelectionSet, SelectionSet {
333+
private class Hero: MockSelectionSet {
334334
typealias Schema = MockSchemaMetadata
335335

336336
override class var __selections: [Selection] {[
@@ -341,7 +341,7 @@ class RequestChainTests: XCTestCase {
341341
var name: String { __data["name"] }
342342
}
343343

344-
func test__retain_release__givenQuery_shouldNotHaveRetainCycle() {
344+
func test__retain_release__givenQuery_shouldNotHaveRetainCycle() throws {
345345
// given
346346
let client = MockURLSessionClient(
347347
response: .mock(
@@ -366,10 +366,10 @@ class RequestChainTests: XCTestCase {
366366
])
367367
weak var weakRequestChain: RequestChain? = requestChain
368368

369-
let expectedData = Hero(data: DataDict([
369+
let expectedData = try Hero(data: [
370370
"__typename": "Hero",
371371
"name": "R2-D2"
372-
], variables: nil))
372+
], variables: nil)
373373

374374
let expectation = expectation(description: "Response received")
375375

@@ -402,7 +402,7 @@ class RequestChainTests: XCTestCase {
402402
XCTAssertNil(weakRequestChain)
403403
}
404404

405-
func test__retain_release__givenSubscription_whenCancelled_shouldNotHaveRetainCycle() {
405+
func test__retain_release__givenSubscription_whenCancelled_shouldNotHaveRetainCycle() throws {
406406
// given
407407
let client = MockURLSessionClient(
408408
response: .mock(
@@ -445,10 +445,10 @@ class RequestChainTests: XCTestCase {
445445
])
446446
weak var weakRequestChain: RequestChain? = requestChain
447447

448-
let expectedData = Hero(data: DataDict([
448+
let expectedData = try Hero(data: [
449449
"__typename": "Hero",
450450
"name": "R2-D2"
451-
], variables: nil))
451+
], variables: nil)
452452

453453
let expectation = expectation(description: "Response received")
454454
expectation.expectedFulfillmentCount = 2

0 commit comments

Comments
 (0)