Skip to content

Commit

Permalink
Merge pull request #3487 from hstastna/Default_view_settings_service_…
Browse files Browse the repository at this point in the history
…catalogs

Fix Default Views settings for Service Catalogs
(cherry picked from commit 819ebed)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1553336
  • Loading branch information
h-kataria authored and simaishi committed Mar 8, 2018
1 parent b550dd6 commit 625fe38
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/catalog_controller.rb
Expand Up @@ -964,6 +964,7 @@ def service_template_list(scope, options = {})
:function => "miqOrderService",
:title => _("Order this Service")} # Show a button instead of the checkbox
end
options[:gtl_dbname] = :catalog
end
options[:named_scope] = scope
process_show_list(options)
Expand Down
17 changes: 17 additions & 0 deletions spec/controllers/catalog_controller_spec.rb
Expand Up @@ -1050,4 +1050,21 @@
expect(ct_details).to eq(options)
end
end

describe '#service_template_list' do
let(:sandbox) { {:active_tree => tree} }

before do
controller.instance_variable_set(:@sb, sandbox)
end

context 'Service Catalogs accordion' do
let(:tree) { :svccat_tree }

it 'sets options for rendering proper type of view' do
expect(controller).to receive(:process_show_list).with(:gtl_dbname => :catalog, :named_scope => {})
controller.send(:service_template_list, {})
end
end
end
end

0 comments on commit 625fe38

Please sign in to comment.