Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
calvincestari committed Sep 19, 2023
1 parent 076c019 commit 17a1571
Showing 1 changed file with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7439,6 +7439,7 @@ class SelectionSetTemplateTests: XCTestCase {
public static var __parentType: ApolloAPI.ParentType { TestSchema.Objects.Dog }
public var species: String { __data["species"] }
public var id: String { __data["id"] }
}
"""

Expand Down Expand Up @@ -7490,22 +7491,28 @@ class SelectionSetTemplateTests: XCTestCase {
}
"""

let expectedOne = """
let expected = """
public struct One: TestSchema.InlineFragment, ApolloAPI.Deferrable {
public let __data: DataDict
public init(_dataDict: DataDict) { __data = _dataDict }
public typealias RootEntityType = InlineFragment2.Data.AllAnimal
public typealias RootEntityType = TestOperation.Data.AllAnimal
public static var __parentType: ApolloAPI.ParentType { TestSchema.Objects.Dog }
"""
let expectedTwo = """
public var species: String { __data["species"] }
public var id: String? { __data["id"] }
}
public struct Two: TestSchema.InlineFragment, ApolloAPI.Deferrable {
public let __data: DataDict
public init(_dataDict: DataDict) { __data = _dataDict }
public typealias RootEntityType = InlineFragment2.Data.AllAnimal
public typealias RootEntityType = TestOperation.Data.AllAnimal
public static var __parentType: ApolloAPI.ParentType { TestSchema.Objects.Dog }
public var genus: String { __data["genus"] }
public var id: String? { __data["id"] }
}
"""

// when
Expand All @@ -7517,8 +7524,7 @@ class SelectionSetTemplateTests: XCTestCase {
let actual = subject.render(inlineFragment: allAnimals_asDog)

// then
expect(actual).to(equalLineByLine(expectedOne, atLine: 30, ignoringExtraLines: true))
expect(actual).to(equalLineByLine(expectedTwo, atLine: 43, ignoringExtraLines: true))
expect(actual).to(equalLineByLine(expected, atLine: 30, ignoringExtraLines: true))
}

// MARK: - InlineFragment RootEntityType Tests
Expand Down

0 comments on commit 17a1571

Please sign in to comment.