Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive for unused_preload_association #445

Open
darren987469 opened this issue Jan 10, 2019 · 1 comment
Open

False positive for unused_preload_association #445

darren987469 opened this issue Jan 10, 2019 · 1 comment

Comments

@darren987469
Copy link

I upgrade bullet from 5.7.5 to 5.9.0 and the following spec fail.

it 'should not detect unused preload associations' do
  comment = Comment.last
  post = Post.last
  comment.update(post: post)

  Bullet::Detector::UnusedEagerLoading.check_unused_preload_associations
  expect(Bullet::Detector::Association).not_to be_has_unused_preload_associations
end

After digging, it looks like the bug was introduced at 582b2d4. In the spec, it misses the call check_unused_preload_associations and the spec fails. I opened a PR to show that #444.

@billgloff
Copy link

Also seeing the same behavior and have been on version 5.7.5 ever since last summer. Please look into merging the attached pr if it indeed fixes this issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants