From 41a627eaaf29658a401ac43e4da838a5b622f44e Mon Sep 17 00:00:00 2001
From: 李彤 <litong@prec-tech.com>
Date: 星期一, 29 五月 2023 16:54:34 +0800
Subject: [PATCH] DB202303088261
---
force-app/main/default/classes/SendConsumableordertosapTest.cls | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/force-app/main/default/classes/SendConsumableordertosapTest.cls b/force-app/main/default/classes/SendConsumableordertosapTest.cls
index 660dad3..1330317 100644
--- a/force-app/main/default/classes/SendConsumableordertosapTest.cls
+++ b/force-app/main/default/classes/SendConsumableordertosapTest.cls
@@ -99,6 +99,7 @@
Product_Register__c = prc.Id
);
insert prlc;
+
user MyUser_Test1 = New User(ContactId = core1.Id,
Alias = 'newUser1',
Email='newuser1@testorg.com',
@@ -110,7 +111,16 @@
ProfileId = prof.Id,
TimeZoneSidKey='Asia/Shanghai',
UserName='testUser1@testorg.com');
- insert MyUser_Test1;
+
+ //lt
+ if (Test.isRunningTest()) {
+ System.runAs(new User(Id = UserInfo.getUserId())){
+ insert MyUser_Test1;
+ }
+ }
+ //lt
+
+ // insert MyUser_Test1;
//缁忛攢鍟嗘湁鏁堝悎鍚�
Account myAccount2 = new Account(name='Testaccount002',
RecordTypeId = rectContract[0].Id,
--
Gitblit v1.9.1