File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -1391,13 +1391,10 @@ private class SoqlTest {
13911391 Soql testQuery = DatabaseLayer .Soql .newQuery (Account .SObjectType )
13921392 ?. addWhere (Account .Id , Soql .IN_COLLECTION , innerQuery )
13931393 ?. toSoql ();
1394+ String expected = ' SELECT Id FROM Account WHERE Id IN (SELECT AccountId FROM Case WHERE OwnerId = :ownerId)' ;
13941395
13951396 Test .startTest ();
1396- try {
1397- testQuery ?. query ();
1398- } catch (System .QueryException queryError ) {
1399- Assert .fail (queryError ?. toString ());
1400- }
1397+ SoqlTest .validateQuery (testQuery , expected );
14011398 Test .stopTest ();
14021399
14031400 String key = owner ?. getKey ();
@@ -1412,13 +1409,10 @@ private class SoqlTest {
14121409 ?. addWhere (Opportunity .OwnerId , Soql .EQUALS , owner )
14131410 ?. toSubquery ();
14141411 Soql testQuery = DatabaseLayer .Soql .newQuery (Account .SObjectType )?. addSelect (subquery )?. toSoql ();
1412+ String expected = ' SELECT Id, (SELECT Id FROM Opportunities WHERE OwnerId = :ownerId) FROM Account' ;
14151413
14161414 Test .startTest ();
1417- try {
1418- testQuery ?. query ();
1419- } catch (System .QueryException queryError ) {
1420- Assert .fail (queryError ?. toString ());
1421- }
1415+ SoqlTest .validateQuery (testQuery , expected );
14221416 Test .stopTest ();
14231417
14241418 String key = owner ?. getKey ();
You can’t perform that action at this time.
0 commit comments