From fd2184ee47221684ceccf93b7a65428835055253 Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期三, 06 四月 2022 11:55:06 +0800
Subject: [PATCH] Merge branch 'PIPLDeploy0405'
---
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