Skip to content

Commit

Permalink
update readme tests to exec
Browse files Browse the repository at this point in the history
  • Loading branch information
ezekg committed Aug 16, 2024
1 parent f959ef4 commit 21c514f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/union_of_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1507,19 +1507,19 @@ def owned = where(owner: proxy_association.owner)
end

it 'should support joins' do
expect { Book.joins(:contributors).where(contributors: { user_id: author.id }) }.to_not raise_error
expect { Book.joins(:contributors).where(contributors: { id: author.id }).to_a }.to_not raise_error
end

it 'should support preloading' do
expect { Book.preload(:contributors) }.to_not raise_error
expect { Book.preload(:contributors).to_a }.to_not raise_error
end

it 'should support eager loading' do
expect { Book.eager_load(:contributors) }.to_not raise_error
expect { Book.eager_load(:contributors).to_a }.to_not raise_error
end

it 'should support includes' do
expect { Book.includes(:contributors) }.to_not raise_error
expect { Book.includes(:contributors).to_a }.to_not raise_error
end
end
end

0 comments on commit 21c514f

Please sign in to comment.