From 1727a4f4d02e429475608e60f142a63bc24127bc Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期一, 23 十月 2023 10:07:34 +0800
Subject: [PATCH] 近期修改
---
force-app/main/default/classes/BidAnnounceIframeControllerTest.cls | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/force-app/main/default/classes/BidAnnounceIframeControllerTest.cls b/force-app/main/default/classes/BidAnnounceIframeControllerTest.cls
index e3bb1eb..6549839 100644
--- a/force-app/main/default/classes/BidAnnounceIframeControllerTest.cls
+++ b/force-app/main/default/classes/BidAnnounceIframeControllerTest.cls
@@ -31,12 +31,20 @@
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 = '';
--
Gitblit v1.9.1