Skip to content

Commit 1d0bb45

Browse files
committed
Remove error domain test
1 parent f892c28 commit 1d0bb45

1 file changed

Lines changed: 2 additions & 18 deletions

File tree

Tests/WordPressKitTests/CoreAPITests/WordPressOrgXMLRPCApiTests.swift

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,8 @@ class WordPressOrgXMLRPCApiTests: XCTestCase {
6060
},
6161
failure: { (error, _) in
6262
expect.fulfill()
63-
// When building for SPM, the compiler doesn't generate the domain constant.
64-
#if SWIFT_PACKAGE
65-
XCTAssertEqual(error.domain, "CoreAPI.WordPressOrgXMLRPCApiError")
66-
#else
67-
XCTAssertEqual(error.domain, WordPressOrgXMLRPCApiErrorDomain)
68-
#endif
63+
64+
XCTAssertTrue(error is WordPressOrgXMLRPCApiError)
6965

7066
let error = error as NSError
7167
XCTAssertEqual(error.code, WordPressOrgXMLRPCApiError.httpErrorStatusCode.rawValue)
@@ -95,12 +91,6 @@ class WordPressOrgXMLRPCApiTests: XCTestCase {
9591
expect.fulfill()
9692

9793
XCTAssertFalse(error is WordPressOrgXMLRPCApiError)
98-
// When building for SPM, the compiler doesn't generate the domain constant.
99-
#if SWIFT_PACKAGE
100-
XCTAssertEqual(error.domain, "CoreAPI.WordPressOrgXMLRPCApiError")
101-
#else
102-
XCTAssertEqual(error.domain, WordPressOrgXMLRPCApiErrorDomain)
103-
#endif
10494

10595
let error = error as NSError
10696
XCTAssertEqual(error.code, 403)
@@ -130,12 +120,6 @@ class WordPressOrgXMLRPCApiTests: XCTestCase {
130120
expect.fulfill()
131121

132122
XCTAssertTrue(error is WordPressOrgXMLRPCApiError)
133-
// When building for SPM, the compiler doesn't generate the domain constant.
134-
#if SWIFT_PACKAGE
135-
XCTAssertEqual(error.domain, "CoreAPI.WordPressOrgXMLRPCApiError")
136-
#else
137-
XCTAssertEqual(error.domain, WordPressOrgXMLRPCApiErrorDomain)
138-
#endif
139123

140124
let error = error as NSError
141125
XCTAssertEqual(error.code, WordPressOrgXMLRPCApiError.unknown.rawValue)

0 commit comments

Comments
 (0)