-
Notifications
You must be signed in to change notification settings - Fork 141
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
Improved request_spec by removing direct filtering by Classification#parent_id #611
Improved request_spec by removing direct filtering by Classification#parent_id #611
Conversation
@miq-bot add-label bug |
/cc @gtanzillo @kbrock |
spec/requests/requests_spec.rb
Outdated
@@ -258,7 +258,7 @@ | |||
|
|||
FactoryBot.create(:classification_department_with_tags) | |||
|
|||
t = Classification.where(:description => 'Department', :parent_id => 0).includes(:tag).first | |||
t = Classification.where(:description => 'Department', :parent_id => nil).includes(:tag).first |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks a bit strange because the category should have :parent_id => 0
in Classifications. Is it possible that the factory can be fixed to ensure that the category is created that way instead of this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this.
lets get parent_id => 0
(or now it is parent_id => nil
) out of our code base
thanks
d82fe80
to
68f14b0
Compare
…- get rid of direct filtering by Classification#parent_id
68f14b0
to
95bd358
Compare
Checked commit yrudman@95bd358 with ruby 2.3.3, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks 👍
get rid of direct filtering by 'Classification#parent_id' in rspec
Improvement suggested by @kbrock to #610
@miq-bot add-label test