Skip to content

Commit

Permalink
Merge pull request #687 from martinpovolny/display_methods
Browse files Browse the repository at this point in the history
Fix middleware display methods methods
  • Loading branch information
mzazrivec authored Mar 15, 2017
2 parents f22f681 + a623717 commit 18093b3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/middleware_domain_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class MiddlewareDomainController < ApplicationController
after_action :set_session_data

def self.display_methods
%i(middleware_server_groups)
%w(middleware_server_groups)
end

menu_section :cnt
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/middleware_server_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def add_datasource
end

def self.display_methods
%i(middleware_datasources middleware_deployments middleware_messagings)
%w(middleware_datasources middleware_deployments middleware_messagings)
end

def button
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/middleware_server_group_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def self.operations
end

def self.display_methods
%i(middleware_servers)
%w(middleware_servers)
end

def textual_group_list
Expand Down
14 changes: 14 additions & 0 deletions spec/controllers/middleware_server_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,18 @@
end
end
end

# FIXME: should test for nested entities: %w(middleware_datasources middleware_deployments middleware_messagings)
describe '#show' do
before do
EvmSpecHelper.create_guid_miq_server_zone
end

let(:server) { FactoryGirl.create(:middleware_server) }
let(:deployment) { FactoryGirl.create(:middleware_deployment, :middleware_server => server) }

it "show associated server groups" do
assert_nested_list(server, [deployment], 'middleware_deployments', 'All Middleware Deployments')
end
end
end

0 comments on commit 18093b3

Please sign in to comment.