Skip to content

Commit

Permalink
Merge pull request #8497 from skateman/bz-1332806
Browse files Browse the repository at this point in the history
Fixed missing partial for cluster drift analysis
(cherry picked from commit 0a288ba)
  • Loading branch information
martinpovolny authored and chessbyte committed May 6, 2016
1 parent 6508785 commit e2c5fb9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/views/ems_cluster/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
= render(:partial => "layouts/show_pdf")
- when "details"
= render(:partial => "layouts/gtl", :locals => {:action_url => @lastaction})
- when "compare", "drift_history", "drift", "item"
- when "compare", "drift"
= render(:partial => "layouts/compare")
- when "drift_history", "item"
= render(:partial => "layouts/#{@showtype}")
- when "timeline"
= render(:partial => "layouts/tl_show")
Expand Down
22 changes: 22 additions & 0 deletions spec/views/ems_cluster/show.html.haml_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
describe "ems_cluster/show.html.haml" do
let(:ems_cluster) { FactoryGirl.create(:ems_cluster_openstack) }
let(:action) { 'index' }

before do
allow(MiqServer).to receive(:my_zone).and_return("default")
creds = {}
creds[:amqp] = {:userid => "amqp_user", :password => "amqp_password"}
assign(:ems, ems_cluster)
assign(:record, ems_cluster)
assign(:showtype, showtype)
end

context 'when showtype is drift' do
let(:showtype) { 'drift' }

it 'should render the compare partial' do
render
expect(response).to render_template(:partial => 'layouts/_compare')
end
end
end

0 comments on commit e2c5fb9

Please sign in to comment.