Skip to content
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

Fix middleware display methods methods #687

Merged
merged 2 commits into from
Mar 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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