From fb04e7c01d119c60632b4298d18fd93f3ccb3d79 Mon Sep 17 00:00:00 2001 From: Li Jun <buli@deloitte.com.cn> Date: 星期三, 06 四月 2022 10:32:05 +0800 Subject: [PATCH] 20220405DeployProduction --- force-app/main/default/classes/OFSInsReportLayoutControllerTest.cls | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/force-app/main/default/classes/OFSInsReportLayoutControllerTest.cls b/force-app/main/default/classes/OFSInsReportLayoutControllerTest.cls index ad4d276..83e40d5 100644 --- a/force-app/main/default/classes/OFSInsReportLayoutControllerTest.cls +++ b/force-app/main/default/classes/OFSInsReportLayoutControllerTest.cls @@ -1,5 +1,9 @@ @isTest private class OFSInsReportLayoutControllerTest { + @TestSetup + static void makeData(){ + TestDataUtility.CreatePIPolicyConfiguration('Inspection_Report__c'); + } public class TestRepo { public final Integer ASSETMAX = 8; public OFSInsReportLayout__c layout { get; private set; } @@ -39,7 +43,8 @@ //Profile prof = [select Id from Profile where Name ='901_缁忛攢鍟嗙ぞ鍖烘櫘閫氭潈闄恄2閲嶉獙璇�']; User loginUser = [Select Id, Alias, Province__c from User where Id =: UserInfo.getUserId()]; loginUser.Job_Category__c = '閿�鍞湇鍔�'; - update loginUser; + //update loginUser; + loginUser = [Select Id, Alias, Province__c from User where Job_Category__c = '閿�鍞湇鍔�' limit 1]; ir = new Inspection_Report__c(Name = '*', Inspection_Date__c = inspectionDate, Hospital__c = hp.Id); ir.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Inspection_Report__c' and DeveloperName = 'EndoscopeSystem'].id; @@ -257,8 +262,10 @@ Test.startTest(); TestRepo repo = new TestRepo(); repo.createInspectionReport(null); + repo.initAssets(); repo.sqlIr(); + String wrongId = repo.ir.Id; wrongId = wrongId.substring(0, 14) + wrongId.substring(13, 14); Apexpages.currentPage().getParameters().put('id', wrongId); -- Gitblit v1.9.1