Skip to content

Commit

Permalink
add hole in spec to cover regression
Browse files Browse the repository at this point in the history
  • Loading branch information
bfrey08 committed Sep 30, 2024
1 parent 0ed0ddd commit 31fa438
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spec/active_force/sobject/includes_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@ module ActiveForce
end
end

context 'when normal select with nested includes' do
it 'formulates the correct SOQL query' do
soql = Blog.select(:id, :link).includes(posts: :comments).to_s
expect(soql).to eq "SELECT Id, Link__c, (SELECT Id, Title__c, BlogId, IsActive, (SELECT Id, PostId, PosterId__c, FancyPostId, Body__c FROM Comments__r) FROM Posts__r) FROM Blog__c"
end
end

context 'with standard objects' do
it 'formulates the correct SOQL query' do
soql = Account.includes(:opportunities).where(id: '123').to_s
Expand Down

0 comments on commit 31fa438

Please sign in to comment.