Closed DominikPalo closed 1 year ago
Noticed the same issue. How about using an empty Data object? Worked for me with Alamofire
let empty = Data()
let mock = Mock(url: url, dataType: .json, statusCode: 204, data: [.delete : empty])
mock.register()
This issue is stale because it has been open for 30 days with no activity. Remove the Stale label or comment or this will be closed in 10 days.
I'm trying to mock empty responses according to the example provided in the readme file, but it seems the code snippet is not compatible with the latest version (3.0.1) of the framework. There is a line:
which prevents Xcode from building the app, as there is no such initializer on the
Mock
structure:No exact matches in call to initializer