| | |
| | | BidAnnounceIframeController controller = new BidAnnounceIframeController(new ApexPages.StandardController(ba)); |
| | | controller.init(); |
| | | |
| | | Attachment att = new Attachment( |
| | | Name = 'test', |
| | | ParentId = ba.Id, |
| | | Body = EncodingUtil.base64Decode('test') |
| | | ContentVersion version = new ContentVersion( |
| | | Title = 'test', |
| | | VersionData = EncodingUtil.base64Decode('test'), |
| | | ContentLocation = 's', |
| | | PathOnClient = 'test.txt' |
| | | ); |
| | | insert att; |
| | | insert version; |
| | | version = [select ContentDocumentId from ContentVersion where Id =: version.Id]; |
| | | ContentDocumentLink link = new ContentDocumentLink(); |
| | | link.ContentDocumentId = version.ContentDocumentId; |
| | | link.LinkedEntityId = ba.Id; |
| | | link.ShareType = 'I'; |
| | | link.Visibility = 'AllUsers'; |
| | | insert link; |
| | | controller.init(); |
| | | |
| | | ba.Web_URL__c = ''; |