Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit 93daa29

Browse files
committed
Update Test
1 parent 69f63dd commit 93daa29

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

WordPressKitTests/JetpackServiceRemoteTests.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class JetpackServiceRemoteTests: RemoteTestCase, RESTTestable {
134134
stubRemoteResponse(endpoint, filename: jetpackRemoteErrorInvalidCredentialsMockFilename, contentType: .ApplicationJSON, status: 400)
135135
remote.installJetpack(url: url, username: username, password: password) { (success, error) in
136136
XCTAssertFalse(success, "Success should be false")
137-
XCTAssertEqual(error, .invalidCredentials)
137+
XCTAssertEqual(error?.type, .invalidCredentials)
138138
expect.fulfill()
139139
}
140140

@@ -147,7 +147,7 @@ class JetpackServiceRemoteTests: RemoteTestCase, RESTTestable {
147147
stubRemoteResponse(endpoint, filename: jetpackRemoteErrorUnknownMockFilename, contentType: .ApplicationJSON, status: 400)
148148
remote.installJetpack(url: url, username: username, password: password) { (success, error) in
149149
XCTAssertFalse(success, "Success should be false")
150-
XCTAssertEqual(error, .unknown)
150+
XCTAssertEqual(error?.type, .unknown)
151151
expect.fulfill()
152152
}
153153

@@ -160,7 +160,7 @@ class JetpackServiceRemoteTests: RemoteTestCase, RESTTestable {
160160
stubRemoteResponse(endpoint, filename: jetpackRemoteErrorForbiddenMockFilename, contentType: .ApplicationJSON, status: 400)
161161
remote.installJetpack(url: url, username: username, password: password) { (success, error) in
162162
XCTAssertFalse(success, "Success should be false")
163-
XCTAssertEqual(error, .forbidden)
163+
XCTAssertEqual(error?.type, .forbidden)
164164
expect.fulfill()
165165
}
166166

@@ -173,7 +173,7 @@ class JetpackServiceRemoteTests: RemoteTestCase, RESTTestable {
173173
stubRemoteResponse(endpoint, filename: jetpackRemoteErrorInstallFailureMockFilename, contentType: .ApplicationJSON, status: 400)
174174
remote.installJetpack(url: url, username: username, password: password) { (success, error) in
175175
XCTAssertFalse(success, "Success should be false")
176-
XCTAssertEqual(error, .installFailure)
176+
XCTAssertEqual(error?.type, .installFailure)
177177
expect.fulfill()
178178
}
179179

@@ -186,7 +186,7 @@ class JetpackServiceRemoteTests: RemoteTestCase, RESTTestable {
186186
stubRemoteResponse(endpoint, filename: jetpackRemoteErrorInstallResponseMockFilename, contentType: .ApplicationJSON, status: 400)
187187
remote.installJetpack(url: url, username: username, password: password) { (success, error) in
188188
XCTAssertFalse(success, "Success should be false")
189-
XCTAssertEqual(error, .installResponseError)
189+
XCTAssertEqual(error?.type, .installResponseError)
190190
expect.fulfill()
191191
}
192192

@@ -199,7 +199,7 @@ class JetpackServiceRemoteTests: RemoteTestCase, RESTTestable {
199199
stubRemoteResponse(endpoint, filename: jetpackRemoteErrorLoginFailureMockFilename, contentType: .ApplicationJSON, status: 400)
200200
remote.installJetpack(url: url, username: username, password: password) { (success, error) in
201201
XCTAssertFalse(success, "Success should be false")
202-
XCTAssertEqual(error, .loginFailure)
202+
XCTAssertEqual(error?.type, .loginFailure)
203203
expect.fulfill()
204204
}
205205

@@ -212,7 +212,7 @@ class JetpackServiceRemoteTests: RemoteTestCase, RESTTestable {
212212
stubRemoteResponse(endpoint, filename: jetpackRemoteErrorSiteIsJetpackMockFilename, contentType: .ApplicationJSON, status: 400)
213213
remote.installJetpack(url: url, username: username, password: password) { (success, error) in
214214
XCTAssertFalse(success, "Success should be false")
215-
XCTAssertEqual(error, .siteIsJetpack)
215+
XCTAssertEqual(error?.type, .siteIsJetpack)
216216
expect.fulfill()
217217
}
218218

@@ -225,7 +225,7 @@ class JetpackServiceRemoteTests: RemoteTestCase, RESTTestable {
225225
stubRemoteResponse(endpoint, filename: jetpackRemoteErrorActivationInstallMockFilename, contentType: .ApplicationJSON, status: 400)
226226
remote.installJetpack(url: url, username: username, password: password) { (success, error) in
227227
XCTAssertFalse(success, "Success should be false")
228-
XCTAssertEqual(error, .activationOnInstallFailure)
228+
XCTAssertEqual(error?.type, .activationOnInstallFailure)
229229
expect.fulfill()
230230
}
231231

@@ -238,7 +238,7 @@ class JetpackServiceRemoteTests: RemoteTestCase, RESTTestable {
238238
stubRemoteResponse(endpoint, filename: jetpackRemoteErrorActivationResponseMockFilename, contentType: .ApplicationJSON, status: 400)
239239
remote.installJetpack(url: url, username: username, password: password) { (success, error) in
240240
XCTAssertFalse(success, "Success should be false")
241-
XCTAssertEqual(error, .activationResponseError)
241+
XCTAssertEqual(error?.type, .activationResponseError)
242242
expect.fulfill()
243243
}
244244

@@ -251,7 +251,7 @@ class JetpackServiceRemoteTests: RemoteTestCase, RESTTestable {
251251
stubRemoteResponse(endpoint, filename: jetpackRemoteErrorActivationFailureMockFilename, contentType: .ApplicationJSON, status: 400)
252252
remote.installJetpack(url: url, username: username, password: password) { (success, error) in
253253
XCTAssertFalse(success, "Success should be false")
254-
XCTAssertEqual(error, .activationFailure)
254+
XCTAssertEqual(error?.type, .activationFailure)
255255
expect.fulfill()
256256
}
257257

0 commit comments

Comments
 (0)