I was trying to test my apex class that gets a CSV file, reads it and creates actual records.
In my test class I tried to convert my CSV string into base64 string. Then I used this line of code Blob fileBody = EncodingUtil.base64Decode(body);
in order to convert the String body to blob by decoding the base64 string.
Finally, passed it into a contentversion (attached to the object from where my apex reads the CSVs. However, on my query for this CSV within the class I am trying to test, the file type is 'UKNOWN'. The query is: List<el_Bulk_Order_Process__c> bulkOrderList = [select id, el_Request_Type__c,(select id, title, FileType, ContentDocumentId from AttachedContentDocuments order by CreatedDate desc) from el_Bulk_Order_Process__c where id in: bulkOrderProcessIds];
Any ideas? Thank you!