Skip to content

Commit 5cb2633

Browse files
authored
Merge pull request #9336 from jrafanie/rails71
Rails 7.1 / Rails 7.0 compatible changes
2 parents 7e3e47e + 508fd9e commit 5cb2633

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

app/helpers/security_group_helper/textual_summary.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def port_range_helper(rule)
102102
elsif rule.port == rule.end_port
103103
rule.port.to_s
104104
else
105-
rule.port_range.to_s(:dash)
105+
rule.port_range.to_fs(:dash)
106106
end
107107
end
108108
end

spec/controllers/ems_cloud_controller_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@
168168
expect(ems).to receive(:sync_users_queue)
169169
post :sync_users, :params => {:id => ems.id, :sync => "", :admin_role => 1, :member_role => 2}
170170
expect(session[:flash_msgs]).to match [a_hash_including(:message => "Sync users queued.", :level => :success)]
171-
expect(response.body).to include("redirected")
172-
expect(response.body).to include("ems_cloud/#{ems.id}")
171+
expect(response.status).to eq(302)
172+
assert_redirected_to(controller.ems_cloud_path(ems.id))
173173
end
174174

175175
it "returns error if admin role is not selected" do

spec/controllers/ems_infra_controller_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@
206206
post :scaling, :params => { :id => @ems.id, :scale => "", :orchestration_stack_id => @orchestration_stack.id,
207207
@orchestration_stack_parameter_compute.name => 2 }
208208
expect(controller.send(:flash_errors?)).to be_falsey
209-
expect(response.body).to include("redirected")
210-
expect(response.body).to include("ems_infra")
209+
expect(response.status).to eq(302)
210+
assert_redirected_to(controller.ems_infra_path(@ems.id))
211211
expect(session[:flash_msgs]).to match [a_hash_including(:message => "Scaling compute-1::count from 1 to 2 ", :level => :success)]
212212
end
213213

@@ -266,8 +266,8 @@
266266
post :scaledown, :params => {:id => @ems.id, :scaledown => "",
267267
:orchestration_stack_id => @orchestration_stack.id, :host_ids => [@host2.id]}
268268
expect(controller.send(:flash_errors?)).to be_falsey
269-
expect(response.body).to include("redirected")
270-
expect(response.body).to include("ems_infra")
269+
expect(response.status).to eq(302)
270+
assert_redirected_to(controller.ems_infra_path(@ems.id))
271271
expect(session[:flash_msgs]).to match [a_hash_including(:message => " Scaling down to 1 compute nodes", :level => :success)]
272272
end
273273

@@ -299,8 +299,8 @@
299299
.to receive(:register_and_configure_nodes).and_return("SUCCESS")
300300
post :register_nodes, :params => {:id => @ems.id, :nodes_json => @nodes_example, :register => 1}
301301
expect(controller.send(:flash_errors?)).to be_falsey
302-
expect(response.body).to include("redirected")
303-
expect(response.body).to include("ems_infra")
302+
expect(response.status).to eq(302)
303+
assert_redirected_to(%r(#{controller.ems_infra_path(@ems.id)}))
304304
end
305305

306306
it "when failure expected, workflow service not reachable" do

0 commit comments

Comments
 (0)