forked from ManageIQ/manageiq-ui-classic
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the VM Infra button checking EmsCloud providers
- Loading branch information
Showing
2 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
spec/helpers/application_helper/buttons/vm_miq_request_new_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
describe ApplicationHelper::Button::VmMiqRequestNew do | ||
let(:view_context) { setup_view_context_with_sandbox({}) } | ||
let(:button) { described_class.new(view_context, {}, {}, {}) } | ||
|
||
describe '#disabled?' do | ||
context "with no ext_management_systems" do | ||
it_behaves_like "a disabled button", "No Infrastructure Provider that supports VM provisioning added" | ||
end | ||
|
||
context "with a cloud ext_management_system" do | ||
let!(:ems) { FactoryBot.create(:ems_cloud) } | ||
|
||
it_behaves_like "a disabled button", "No Infrastructure Provider that supports VM provisioning added" | ||
end | ||
|
||
context "with an infrastructure ext_management_system" do | ||
let!(:ems) { FactoryBot.create(:ems_infra) } | ||
|
||
it_behaves_like "an enabled button" | ||
end | ||
end | ||
end |