-
Notifications
You must be signed in to change notification settings - Fork 359
refactoring methods in catalog_controller_spec.rb #3885
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
Conversation
@miq_bot add_label rbac |
@miq-bot add_label wip |
@VratislavHais please, change the title, so it describes the change you are doing in the PR |
code review: @oslegl |
allow(controller).to receive(:find_checked_items).and_return(ServiceTemplate.all.ids) | ||
allow(controller).to receive(:tag_edit_build_entries_pulldown).and_return(nil) | ||
allow(controller).to receive(:replace_right_cell).with(:action => nil) | ||
controller.send(:x_edit_tags_reset, "ServiceTemplate") |
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.
@VratislavHais expected behaviour is missing here
travis failed on a different file. Can you please restart it? |
close/open PR to restart it. |
controller.instance_variable_set(:@_params, {}) # affects params in controller | ||
controller.instance_variable_set(:@sb, :action => nil) | ||
allow(controller).to receive(:checked_or_params).and_return(ServiceTemplate.all.ids) | ||
allow(controller).to receive(:find_checked_items).and_return(ServiceTemplate.all.ids) |
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 line shouldn't be necessary, as you're already mocking checked_or_params
.
(same as https://github.com/ManageIQ/manageiq-ui-classic/pull/3891/files#r187269347)
Checked commit VratislavHais@294a8ea with ruby 2.3.3, rubocop 0.52.1, 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.
LGTM 👍
Parent issue: #1134