Can anyone substantiate why this is?
Opportunity o2 = new Opportunity();
o2.Name = 'DSGTestClassRecord Opportunity 2';
o2.StageName = 'New';
o2.CLoseDate = Date.today();
insert o2;
Opportunity OppRec1 = [select Id From Opportunity Where Name = 'DSGTestClassRecord Opportunity 2'];
OppRec1.StageName = 'Closed Won';
OppRec1.Sub_Stage__c = 'Paid';
OppRec1.Opportunity_Discount_Approved__c = true;
update OppRec1;
In this class code, the OppRec1 SELECT statement is returning that no rows are found. What?