diff --git a/app/controllers/service_controller.rb b/app/controllers/service_controller.rb index 8eddce4ea47..df9ab056f80 100644 --- a/app/controllers/service_controller.rb +++ b/app/controllers/service_controller.rb @@ -200,7 +200,7 @@ def sanitize_output(stdout) def textual_group_list if @record.type == "ServiceAnsiblePlaybook" - [%i(properties), %i(lifecycle tags)] + [%i(properties), %i(lifecycle tags generic_objects)] else [%i(properties lifecycle relationships generic_objects miq_custom_attributes), %i(vm_totals tags)] end diff --git a/spec/controllers/service_controller_spec.rb b/spec/controllers/service_controller_spec.rb index 48148884b29..67782714f5a 100644 --- a/spec/controllers/service_controller_spec.rb +++ b/spec/controllers/service_controller_spec.rb @@ -234,5 +234,19 @@ end end + context "Generic Object instances in Textual Summary" do + it "displays Generic Objects in Ansible Playbook Service Textual Summary" do + record = FactoryGirl.create(:service_ansible_playbook) + controller.instance_variable_set(:@record, record) + expect(controller.send(:textual_group_list)).to include(array_including(:generic_objects)) + end + + it "displays Generic Objects for all other Services" do + record = FactoryGirl.create(:service) + controller.instance_variable_set(:@record, record) + expect(controller.send(:textual_group_list)).to include(array_including(:generic_objects)) + end + end + it_behaves_like "explorer controller with custom buttons" end