diff --git a/spec/factories/ext_management_system.rb b/spec/factories/ext_management_system.rb
index 65a059e809ce..338c79136ab9 100644
--- a/spec/factories/ext_management_system.rb
+++ b/spec/factories/ext_management_system.rb
@@ -42,6 +42,11 @@
           :aliases => ["manageiq/providers/physical_infra_manager"],
           :class   => "ManageIQ::Providers::PhysicalInfraManager",
           :parent  => :ext_management_system do
+    trait :with_invalid_authentication do
+      after(:create) do |x|
+        x.authentications = [FactoryGirl.build(:authentication, :resource => x, :status => "invalid")]
+      end
+    end
   end
 
   factory :ems_cloud,