Skip to content

Commit

Permalink
Adding factory to ExtManagementSystem with invalid credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasgabriel committed Jan 10, 2018
1 parent 79d25e3 commit 0604e93
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion spec/factories/ext_management_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@
factory :ems_physical_infra,
:aliases => ["manageiq/providers/physical_infra_manager"],
:class => "ManageIQ::Providers::PhysicalInfraManager",
:parent => :ext_management_system
: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,
:aliases => ["manageiq/providers/cloud_manager"],
Expand Down

0 comments on commit 0604e93

Please sign in to comment.