File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Tests/RemoteImageTests/Extensions Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ //
2+ // URLSession+RemoteImageURLDataPublisherTests.swift
3+ // RemoteImageTests
4+ //
5+ // Created by Christian Elies on 15.12.19.
6+ //
7+
8+ import Foundation
9+ @testable import RemoteImage
10+ import XCTest
11+
12+ final class URLSession_RemoteImageURLDataPublisherTests : XCTestCase {
13+ func testDataPublisher( ) {
14+ guard let url = URL ( string: " https://google.de " ) else {
15+ XCTFail ( " Could not create mock URL " )
16+ return
17+ }
18+ let urlSession : URLSession = . shared
19+ let urlRequest = URLRequest ( url: url)
20+ let dataTaskPublisher = urlSession. dataTaskPublisher ( for: urlRequest) . eraseToAnyPublisher ( )
21+ let dataPublisher = urlSession. dataPublisher ( for: urlRequest)
22+ XCTAssertEqual ( dataPublisher. description, dataTaskPublisher. description)
23+ }
24+ }
You can’t perform that action at this time.
0 commit comments