Skip to content

Commit

Permalink
Limit error message match
Browse files Browse the repository at this point in the history
  • Loading branch information
aheber committed Aug 31, 2024
1 parent 427d112 commit 0c2c018
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions dlrs/main/classes/RollupSummariesTest.cls
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,13 @@ private class RollupSummariesTest {
);
fflib_SObjectDomain.triggerHandler(RollupSummaries.class);
System.assertEquals(1, fflib_SObjectDomain.Errors.getAll().size());
System.assertEquals(
'Relationship Criteria \'StageName Equals Won\' is not valid, see SOQL documentation http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_soql_select_conditionexpression.htm, error is \'unexpected token: \'Equals\'\'',
fflib_SObjectDomain.Errors.getAll()[0].message
Assert.isTrue(
fflib_SObjectDomain.Errors.getAll()[0]
.message.startsWith(
'Relationship Criteria \'StageName Equals Won\' is not valid, see SOQL documentation'
)
);

System.assertEquals(
LookupRollupSummary__c.RelationShipCriteria__c,
((fflib_SObjectDomain.FieldError) fflib_SObjectDomain.Errors.getAll()[0])
Expand Down

0 comments on commit 0c2c018

Please sign in to comment.