diff --git a/spec/controllers/provider_foreman_controller_spec.rb b/spec/controllers/provider_foreman_controller_spec.rb index 77c4ee276c4..9bc0a59c9ed 100644 --- a/spec/controllers/provider_foreman_controller_spec.rb +++ b/spec/controllers/provider_foreman_controller_spec.rb @@ -144,7 +144,7 @@ controller.instance_variable_set(:@provider, provider2) allow(controller).to receive(:render_flash) controller.save_provider - expect(assigns(:flash_array).first[:message]).to include("Name has already been taken") + expect(assigns(:flash_array).last[:message]).to include("Name has already been taken") end context "#edit" do