From bda9b6a77d3d6643a0e201e46460bd53a8abaffb Mon Sep 17 00:00:00 2001 From: Ellen Shapiro Date: Wed, 17 Jul 2019 16:56:29 +0200 Subject: [PATCH] simplify check --- .../StarWarsServerCachingRoundtripTests.swift | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Tests/ApolloCacheDependentTests/StarWarsServerCachingRoundtripTests.swift b/Tests/ApolloCacheDependentTests/StarWarsServerCachingRoundtripTests.swift index 53d92f533e..61187dca6c 100644 --- a/Tests/ApolloCacheDependentTests/StarWarsServerCachingRoundtripTests.swift +++ b/Tests/ApolloCacheDependentTests/StarWarsServerCachingRoundtripTests.swift @@ -53,10 +53,7 @@ class StarWarsServerCachingRoundtripTests: XCTestCase { expectation.fulfill() return case .success(let fetchGraphQLResult): - if let errors = fetchGraphQLResult.errors { - // We aren't expecting errors, so fail the test, but don't kill the rest of the checks. - XCTFail("Errors in query result: \(errors)") - } + XCTAssertNil(fetchGraphQLResult.errors) guard fetchGraphQLResult.data != nil else { XCTFail("No query result data from fetching!")