Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Container Provider link to Capacity & Utilization #766

Merged
merged 1 commit into from
Mar 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/views/layouts/listnav/_ems_container.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- if @record.has_perf_data?
%li
= link_to(_('Capacity & Utilization'),
{:action => 'show', :id => @record, :display => 'performance'},
polymorphic_path(@record, :display => "performance"),
:title => _("Show Capacity & Utilization"))
- else
%li.disabled
Expand Down
18 changes: 18 additions & 0 deletions spec/views/layouts/listnav/_ems_container.html.haml_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
describe "layouts/listnav/_ems_container.html.haml" do
helper(QuadiconHelper)

before :each do
set_controller_for_view("ems_container")
assign(:panels, "ems_prop" => true, "ems_rel" => true)
allow(view).to receive(:truncate_length).and_return(10)
allow(view).to receive(:role_allows?).and_return(true)
end

it "link to Capacity & Utilization uses restful path" do
@record = FactoryGirl.create(:ems_openshift)
allow(@record).to receive(:has_perf_data?).and_return(true)
render
expect(response)
.to include("Show Capacity & Utilization\" href=\"/ems_container/#{@record.id}?display=performance\">")
end
end