|
206 | 206 | post :scaling, :params => { :id => @ems.id, :scale => "", :orchestration_stack_id => @orchestration_stack.id,
|
207 | 207 | @orchestration_stack_parameter_compute.name => 2 }
|
208 | 208 | 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)) |
211 | 211 | expect(session[:flash_msgs]).to match [a_hash_including(:message => "Scaling compute-1::count from 1 to 2 ", :level => :success)]
|
212 | 212 | end
|
213 | 213 |
|
|
266 | 266 | post :scaledown, :params => {:id => @ems.id, :scaledown => "",
|
267 | 267 | :orchestration_stack_id => @orchestration_stack.id, :host_ids => [@host2.id]}
|
268 | 268 | 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)) |
271 | 271 | expect(session[:flash_msgs]).to match [a_hash_including(:message => " Scaling down to 1 compute nodes", :level => :success)]
|
272 | 272 | end
|
273 | 273 |
|
|
299 | 299 | .to receive(:register_and_configure_nodes).and_return("SUCCESS")
|
300 | 300 | post :register_nodes, :params => {:id => @ems.id, :nodes_json => @nodes_example, :register => 1}
|
301 | 301 | 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)})) |
304 | 304 | end
|
305 | 305 |
|
306 | 306 | it "when failure expected, workflow service not reachable" do
|
|
0 commit comments