Media uploading preprocessor tests (#820)

* Add sample files to use in the MediaUploadingPreprocessor unit tests
* Add MediaUploadingPreprocessor unit tests
This commit is contained in:
Stefan Ceriu
2023-04-21 19:04:02 +03:00
committed by GitHub
parent b432bd6fe4
commit 0cbb5e6d26
11 changed files with 212 additions and 2 deletions
@@ -166,8 +166,7 @@ final class MediaProviderTests: XCTestCase {
}
private func loadTestImage() throws -> UIImage {
let bundle = Bundle(for: classForCoder)
guard let path = bundle.path(forResource: "test_image", ofType: "png"),
guard let path = Bundle(for: Self.self).path(forResource: "test_image", ofType: "png"),
let image = UIImage(contentsOfFile: path) else {
throw MediaProviderTestsError.screenshotNotFound
}