Skip to content

Commit

Permalink
Fix unit tests broken in 1.1 merge
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyMDev committed Mar 25, 2023
1 parent c4b5bb7 commit 5ae7c16
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ final class MultipartResponseParsingInterceptorTests: XCTestCase {

// MARK: Parsing tests

private class Time: MockSelectionSet, SelectionSet {
private class Time: MockSelectionSet {
typealias Schema = MockSchemaMetadata

override class var __selections: [Selection] {[
Expand Down Expand Up @@ -225,10 +225,10 @@ final class MultipartResponseParsingInterceptorTests: XCTestCase {
""".crlfFormattedData()
)

let expectedData = Time(data: DataDict([
let expectedData = try Time(data: [
"__typename": "Time",
"ticker": 1
], variables: nil))
], variables: nil)

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

Expand Down
14 changes: 7 additions & 7 deletions Tests/ApolloTests/RequestChainTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ class RequestChainTests: XCTestCase {

// MARK: Memory tests

private class Hero: MockSelectionSet, SelectionSet {
private class Hero: MockSelectionSet {
typealias Schema = MockSchemaMetadata

override class var __selections: [Selection] {[
Expand All @@ -341,7 +341,7 @@ class RequestChainTests: XCTestCase {
var name: String { __data["name"] }
}

func test__retain_release__givenQuery_shouldNotHaveRetainCycle() {
func test__retain_release__givenQuery_shouldNotHaveRetainCycle() throws {
// given
let client = MockURLSessionClient(
response: .mock(
Expand All @@ -366,10 +366,10 @@ class RequestChainTests: XCTestCase {
])
weak var weakRequestChain: RequestChain? = requestChain

let expectedData = Hero(data: DataDict([
let expectedData = try Hero(data: [
"__typename": "Hero",
"name": "R2-D2"
], variables: nil))
], variables: nil)

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

Expand Down Expand Up @@ -402,7 +402,7 @@ class RequestChainTests: XCTestCase {
XCTAssertNil(weakRequestChain)
}

func test__retain_release__givenSubscription_whenCancelled_shouldNotHaveRetainCycle() {
func test__retain_release__givenSubscription_whenCancelled_shouldNotHaveRetainCycle() throws {
// given
let client = MockURLSessionClient(
response: .mock(
Expand Down Expand Up @@ -445,10 +445,10 @@ class RequestChainTests: XCTestCase {
])
weak var weakRequestChain: RequestChain? = requestChain

let expectedData = Hero(data: DataDict([
let expectedData = try Hero(data: [
"__typename": "Hero",
"name": "R2-D2"
], variables: nil))
], variables: nil)

let expectation = expectation(description: "Response received")
expectation.expectedFulfillmentCount = 2
Expand Down

0 comments on commit 5ae7c16

Please sign in to comment.