@@ -13,7 +13,7 @@ struct DownloadTests {
1313 let fileURL = URL ( string: " http://example.com/test1.txt " ) !
1414 Mock ( url: fileURL, contentType: . html, statusCode: 200 , data: [ . get: testData] ) . register ( )
1515
16- try await download ( src: fileURL, dest: destinationURL)
16+ try await download ( src: fileURL, dest: destinationURL, urlSession : URLSession . shared )
1717
1818 try #require( FileManager . default. fileExists ( atPath: destinationURL. path) )
1919 defer { try ? FileManager . default. removeItem ( at: destinationURL) }
@@ -32,7 +32,7 @@ struct DownloadTests {
3232
3333 Mock ( url: fileURL, contentType: . html, statusCode: 200 , data: [ . get: testData] ) . register ( )
3434
35- try await download ( src: fileURL, dest: destinationURL)
35+ try await download ( src: fileURL, dest: destinationURL, urlSession : URLSession . shared )
3636 try #require( FileManager . default. fileExists ( atPath: destinationURL. path) )
3737 let downloadedData = try Data ( contentsOf: destinationURL)
3838 #expect( downloadedData == testData)
@@ -44,7 +44,7 @@ struct DownloadTests {
4444 }
4545 mock. register ( )
4646
47- try await download ( src: fileURL, dest: destinationURL)
47+ try await download ( src: fileURL, dest: destinationURL, urlSession : URLSession . shared )
4848 let unchangedData = try Data ( contentsOf: destinationURL)
4949 #expect( unchangedData == testData)
5050 #expect( etagIncluded)
@@ -61,7 +61,7 @@ struct DownloadTests {
6161
6262 Mock ( url: fileURL, contentType: . html, statusCode: 200 , data: [ . get: ogData] ) . register ( )
6363
64- try await download ( src: fileURL, dest: destinationURL)
64+ try await download ( src: fileURL, dest: destinationURL, urlSession : URLSession . shared )
6565 try #require( FileManager . default. fileExists ( atPath: destinationURL. path) )
6666 var downloadedData = try Data ( contentsOf: destinationURL)
6767 #expect( downloadedData == ogData)
@@ -73,7 +73,7 @@ struct DownloadTests {
7373 }
7474 mock. register ( )
7575
76- try await download ( src: fileURL, dest: destinationURL)
76+ try await download ( src: fileURL, dest: destinationURL, urlSession : URLSession . shared )
7777 downloadedData = try Data ( contentsOf: destinationURL)
7878 #expect( downloadedData == newData)
7979 #expect( etagIncluded)
0 commit comments