| | |
| | | @isTest(SeeAllData=true) |
| | | private class Batch_FixAttachmentToFilesTest { |
| | | |
| | | @isTest(SeeAllData=true) |
| | | static void testInit() { |
| | | String rectCo = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Agency').getRecordTypeId(); |
| | |
| | | Datetime creStartDate; |
| | | Datetime creEndDate; |
| | | |
| | | List<Attachment> attachmentList = [ |
| | | SELECT Id, Name, OwnerId, ParentId, Parent.Name, Parent.Type, Body, CreatedDate, CreatedById |
| | | FROM Attachment |
| | | WHERE Id = :attachList[0].Id |
| | | ORDER BY CreatedDate ASC |
| | | LIMIT 1 |
| | | ]; |
| | | List<Attachment> attachmentList = [Select Id, Name, OwnerId, ParentId, Parent.Name, Parent.Type, Body, CreatedDate, CreatedById |
| | | From Attachment |
| | | Where Id =:attachList[0].Id |
| | | Order by CreatedDate ASC |
| | | Limit 1]; |
| | | for (Attachment att : attachmentList) { |
| | | Id.add(att.ParentId); |
| | | objectType = att.Parent.Name; |