Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ManageIQ/manageiq-ui-classic
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 31c58b77a58917091f1461d285a6de3eb4dd2e69
Choose a base ref
..
head repository: ManageIQ/manageiq-ui-classic
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 970bfd950eb7f17d3ad3315a896f54048ff515c0
Choose a head ref
Showing with 14 additions and 10 deletions.
  1. +14 −10 spec/helpers/application_helper/toolbar_builder_spec.rb
24 changes: 14 additions & 10 deletions spec/helpers/application_helper/toolbar_builder_spec.rb
Original file line number Diff line number Diff line change
@@ -161,16 +161,20 @@ def add_button_to_set(button_set, button)
login_as user
end
let(:definition_object) { FactoryBot.create(template) }
let(:object) { FactoryBot.create(instance, "#{template.to_s}_id".to_sym => definition_object.id) }
let!(:button) { FactoryBot.create(:custom_button,
:applies_to_class => definition_object.class,
:applies_to_id => definition_object.id,
:visibility => {:roles => ["_ALL_"]},
:options => {:button_icon => 'fa fa-star'})}
let!(:unassigned_button) { FactoryBot.create(:custom_button,
:applies_to_class => object.class,
:visibility => {:roles => ["_ALL_"]},
:options => {:button_icon => 'fa fa-star'})}
let(:object) { FactoryBot.create(instance, "#{template}_id".to_sym => definition_object.id) }
let!(:button) do
FactoryBot.create(:custom_button,
:applies_to_class => definition_object.class,
:applies_to_id => definition_object.id,
:visibility => {:roles => ["_ALL_"]},
:options => {:button_icon => 'fa fa-star'})
end
let!(:unassigned_button) do
FactoryBot.create(:custom_button,
:applies_to_class => object.class,
:visibility => {:roles => ["_ALL_"]},
:options => {:button_icon => 'fa fa-star'})
end

it "#custom_button_add_related_buttons returns only CustomButton without CustomButtonSet that applies to #{template.to_s.camelize}" do
toolbar = Class.new(ApplicationHelper::Toolbar::Basic)