Skip to content

Commit

Permalink
Spec for the configured systems displayed in the config. manager tab
Browse files Browse the repository at this point in the history
  • Loading branch information
lgalis committed Feb 10, 2017
1 parent cccf5d5 commit 717a185
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion spec/controllers/provider_foreman_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -390,10 +390,22 @@
allow(controller).to receive(:x_active_accord).and_return(:configuration_manager_cs_filter)
allow(controller).to receive(:build_listnav_search_list)
controller.instance_variable_set(:@_params, :id => "configuration_manager_cs_filter_accord")
expect(controller).to receive(:get_view).with("ConfiguredSystem", :dbname => :cm_configured_systems).and_call_original
expect(controller).to receive(:get_view).with("ManageIQ::Providers::Foreman::ConfigurationManager::ConfiguredSystem", :dbname => :cm_configured_systems).and_call_original
allow(controller).to receive(:build_listnav_search_list)
controller.send(:accordion_select)
end

it "does not display an automation manger configured system in the Configured Systems accordion" do
stub_user(:features => :all)
FactoryGirl.create(:configured_system_ansible_tower)
allow(controller).to receive(:x_active_tree).and_return(:configuration_manager_cs_filter_tree)
allow(controller).to receive(:x_active_accord).and_return(:configuration_manager_cs_filter)
allow(controller).to receive(:build_listnav_search_list)
controller.instance_variable_set(:@_params, :id => "configuration_manager_cs_filter_accord")
controller.send(:accordion_select)
view = controller.instance_variable_get(:@view)
expect(view.table.data.size).to eq(5)
end
end

it "singularizes breadcrumb name" do
Expand Down

0 comments on commit 717a185

Please sign in to comment.