diff --git a/spec/helpers/application_helper/toolbar/diagnostics_zone_center_spec.rb b/spec/helpers/application_helper/toolbar/diagnostics_zone_center_spec.rb new file mode 100644 index 000000000000..80df1408dcb6 --- /dev/null +++ b/spec/helpers/application_helper/toolbar/diagnostics_zone_center_spec.rb @@ -0,0 +1,13 @@ +describe ApplicationHelper::Toolbar::MiqAeDomainCenter do + describe "definition of class" do + it "contains the server delete button" do + diagnostics_zone_center = Kernel.const_get("ApplicationHelper::Toolbar::DiagnosticsZoneCenter") + buttons = diagnostics_zone_center.definition["ldap_domain_vmdb"].buttons + button_names = [] + buttons.each do |button| + button_names += button[:items].pluck(:id) if button[:items] + end + expect(button_names).to include("zone_delete_server") + end + end +end