Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Spec for gtl_dbname for configuration profiles
Browse files Browse the repository at this point in the history
lgalis committed Dec 6, 2017
1 parent 02720fd commit 795d783
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions spec/controllers/provider_foreman_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -434,6 +434,22 @@
controller.send(:accordion_select)
end

it "calls get_view with the associated dbname for the Configuration Profiles list" do
stub_user(:features => :all)
allow(controller).to receive(:x_active_tree).and_return(:configuration_manager_providers_tree)
allow(controller).to receive(:x_active_accord).and_return(:configuration_manager_providers)
ems_id = ems_id_for_provider(@provider)
controller.instance_variable_set(:@in_report_data, true)
controller.instance_variable_set(:@_params, :id => ems_key_for_provider(@provider))
allow(controller).to receive(:build_listnav_search_list)
allow(controller).to receive(:apply_node_search_text)
expect(controller).to receive(:get_view).with("ConfigurationProfile", {:match_via_descendants=>"ConfiguredSystem",
:named_scope=>[[:with_manager, ems_id]],
:dbname=>:cm_configuration_profiles,
:gtl_dbname=>:cm_configuration_profiles}).and_call_original
controller.send(:tree_select)
end

it "calls get_view with the associated dbname for the Configured Systems accordion" do
stub_user(:features => :all)
allow(controller).to receive(:x_active_tree).and_return(:configuration_manager_cs_filter_tree)

0 comments on commit 795d783

Please sign in to comment.