File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -41,15 +41,16 @@ final class ListFolderTests: XCTestCase {
4141 )
4242 }
4343 )
44-
45- let result = try await listFolder (
44+ let params = ListFolder . Params (
4645 path: " test-path " ,
4746 recursive: true ,
4847 includeDeleted: true ,
4948 limit: 1234 ,
5049 includeNonDownloadableFiles: false
5150 )
5251
52+ let result = try await listFolder ( params)
53+
5354 await httpRequests. withValue {
5455 let expectedRequest : URLRequest = {
5556 let url = URL ( string: " https://api.dropboxapi.com/2/files/list_folder " ) !
@@ -59,10 +60,12 @@ final class ListFolderTests: XCTestCase {
5960 " Authorization " : " \( credentials. tokenType) \( credentials. accessToken) " ,
6061 " Content-Type " : " application/json "
6162 ]
63+ request. httpBody = try ! JSONEncoder . api. encode ( params)
6264 return request
6365 } ( )
6466
6567 XCTAssertEqual ( $0, [ expectedRequest] )
68+ XCTAssertEqual ( $0. first? . httpBody, expectedRequest. httpBody!)
6669 }
6770 XCTAssertEqual ( result, ListFolder . Result (
6871 cursor: " c1234 " ,
You can’t perform that action at this time.
0 commit comments