Skip to content

Commit 20edb84

Browse files
authored
Update NetworkServiceTests.swift
1 parent c0d2723 commit 20edb84

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

ExampleMVVMTests/Infrastructure/Network/NetworkServiceTests.swift

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -86,33 +86,6 @@ class NetworkServiceTests: XCTestCase {
8686
//then
8787
wait(for: [expectation], timeout: 0.1)
8888
}
89-
90-
func test_whenMalformedUrlPassed_shouldReturnUrlGenerationError() {
91-
//given
92-
let config = NetworkConfigurableMock()
93-
let expectation = self.expectation(description: "Should return correct data")
94-
95-
let expectedResponseData = "Response data".data(using: .utf8)!
96-
let sut = DefaultNetworkService(config: config, sessionManager: NetworkSessionManagerMock(response: nil,
97-
data: expectedResponseData,
98-
error: nil))
99-
//when
100-
_ = sut.request(endpoint: EndpointMock(path: "-;@,?:ą", method: .get)) { result in
101-
do {
102-
_ = try result.get()
103-
XCTFail("Should throw url generation error")
104-
} catch let error {
105-
guard case NetworkError.urlGeneration = error else {
106-
XCTFail("Should throw url generation error")
107-
return
108-
}
109-
110-
expectation.fulfill()
111-
}
112-
}
113-
//then
114-
wait(for: [expectation], timeout: 0.1)
115-
}
11689

11790
func test_whenStatusCodeEqualOrAbove400_shouldReturnhasStatusCodeError() {
11891
//given

0 commit comments

Comments
 (0)