Skip to content

Commit

Permalink
Merge pull request #5124 from h-kataria/fixed_reconfigure_service_rig…
Browse files Browse the repository at this point in the history
…ht_cell_header

Updated right cell header
  • Loading branch information
mzazrivec authored Jan 4, 2019
2 parents 6332d21 + 5d15006 commit 50c577c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/service_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def service_reconfigure
service_template = service.service_template
resource_action = service_template.resource_actions.find_by(:action => 'Reconfigure') if service_template

@right_cell_text = _("Reconfigure Service \"%{name}\"") % {:name => service_template.name}
@right_cell_text = _("Reconfigure Service \"%{name}\"") % {:name => service.name}
dialog_locals = {:resource_action_id => resource_action.id, :target_id => service.id}
replace_right_cell(:action => "reconfigure_dialog", :dialog_locals => dialog_locals)
end
Expand Down
4 changes: 2 additions & 2 deletions spec/controllers/service_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
end

describe "#service_reconfigure" do
let(:service) { instance_double("Service", :id => 321, :service_template => service_template) }
let(:service) { instance_double("Service", :id => 321, :service_template => service_template, :name => "foo name") }
let(:service_template) { instance_double("ServiceTemplate", :name => "the name") }
let(:ar_association_dummy) { double }
let(:resource_action) { instance_double("ResourceAction", :id => 123) }
Expand All @@ -37,7 +37,7 @@

it "sets the right cell text" do
controller.send(:service_reconfigure)
expect(controller.instance_variable_get(:@right_cell_text)).to eq("Reconfigure Service \"the name\"")
expect(controller.instance_variable_get(:@right_cell_text)).to eq("Reconfigure Service \"foo name\"")
end

it "replaces the right cell with the reconfigure dialog partial" do
Expand Down

0 comments on commit 50c577c

Please sign in to comment.