Skip to content

Commit 38aee34

Browse files
author
Robert Sösemann
authored
The test addChildQueries_invalidChildRelationship() failed in orgs with relationship fields from Contact to Contact. This is case often seen. So I think using null instead of a specific type is less risky and tests exactly the same functionality.
1 parent a4792b3 commit 38aee34

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fflib/src/classes/fflib_QueryFactoryTest.cls

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,8 @@ private class fflib_QueryFactoryTest {
503503
Schema.DescribeSObjectResult descResult = Account.SObjectType.getDescribe();
504504
Exception e;
505505
try {
506-
fflib_QueryFactory childQf = qf.subselectQuery(Contact.SObjectType);
506+
SObjectType invalidType = null;
507+
fflib_QueryFactory childQf = qf.subselectQuery(invalidType);
507508
childQf.selectField('Id');
508509
} catch (fflib_QueryFactory.InvalidSubqueryRelationshipException ex) {
509510
e = ex;
@@ -843,4 +844,4 @@ private class fflib_QueryFactoryTest {
843844
}
844845
return usr;
845846
}
846-
}
847+
}

0 commit comments

Comments
 (0)