Skip to content

Commit

Permalink
Add spec test to check options for Service Catalogs page view
Browse files Browse the repository at this point in the history
Add spec test to check options for Service Catalogs page view in service_template_list
method, for proper setting of @gtl_type variable in application controller.
  • Loading branch information
Hilda Stastna committed Mar 1, 2018
1 parent 971c8f3 commit e54d3b9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions spec/controllers/catalog_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1079,4 +1079,21 @@
end
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 e54d3b9

Please sign in to comment.