Skip to content

Commit

Permalink
Merge pull request ManageIQ#1408 from himdel/wbem
Browse files Browse the repository at this point in the history
Remove old require wbem from spec
  • Loading branch information
martinpovolny authored May 23, 2017
2 parents e7c95dd + 7855984 commit 1a46112
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 17 deletions.
1 change: 0 additions & 1 deletion app/helpers/application_helper/button/zone_delete.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ def disabled?

def relationships?
@selected_zone.ext_management_systems.count > 0 ||
@selected_zone.storage_managers.count > 0 ||
@selected_zone.miq_schedules.count > 0 ||
@selected_zone.miq_servers.count > 0
end
Expand Down
4 changes: 1 addition & 3 deletions app/helpers/quadicon_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -566,9 +566,7 @@ def render_non_listicon_single_quadicon(item, options)
output << flobj_img_simple(img_path, "e72")

unless options[:typ] == :listnav
name = if item.kind_of?(MiqCimInstance)
item.evm_display_name
elsif item.kind_of?(MiqProvisionRequest)
name = if item.kind_of?(MiqProvisionRequest)
item.message
else
item.try(:name)
Expand Down
6 changes: 0 additions & 6 deletions app/views/ops/_settings_evm_servers_tab.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@
.col-md-10
%p.form-control-static
= @selected_zone.ext_management_systems.count
.form-group
%label.col-md-2.control-label
= _("Storage Managers")
.col-md-10
%p.form-control-static
= @selected_zone.storage_managers.count
.form-group
%label.col-md-2.control-label
= _("Schedules")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
end

let(:has_many_field_col) do
['Vm.Storage.Storage Volumes.Disks : Storage Volume Class Hier', 'Vm.storage_volumes-class_hier']
['Vm.Service.User.Miq Templates : Last Analysis Time', 'Vm.service.user.miq_templates-last_scan_attempt_on']
end

let(:cols) do
Expand Down
8 changes: 4 additions & 4 deletions spec/helpers/application_helper/buttons/zone_delete_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,26 @@
let(:zone_name) { 'Default' }
it_behaves_like 'a disabled button', "'Default' zone cannot be deleted"
end

context 'when selected zone is not the default one' do
context 'and zone has ext_management_systems' do
let(:set_relationships) { selected_zone.ext_management_systems << FactoryGirl.create(:ext_management_system) }
it_behaves_like 'a disabled button', 'Cannot delete a Zone that has Relationships'
end
context 'and zone hase storage_managers' do
let(:set_relationships) { selected_zone.storage_managers << FactoryGirl.create(:storage_manager, :name => 'M') }
it_behaves_like 'a disabled button', 'Cannot delete a Zone that has Relationships'
end

context 'and zone has miq_schedules' do
let(:set_relationships) do
MiqServer.seed
selected_zone.miq_schedules << FactoryGirl.create(:miq_schedule)
end
it_behaves_like 'a disabled button', 'Cannot delete a Zone that has Relationships'
end

context 'and zone has miq_servers' do
let(:set_relationships) { selected_zone.miq_servers << FactoryGirl.create(:miq_server) }
it_behaves_like 'a disabled button', 'Cannot delete a Zone that has Relationships'
end

context 'and zone has no relationships' do
it_behaves_like 'an enabled button'
end
Expand Down
2 changes: 0 additions & 2 deletions spec/helpers/quadicon_helper_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'wbem'

RSpec.shared_examples :quadicon_with_link do
it 'renders a quadicon with a link by default' do
expect(subject).to have_selector('div.quadicon')
Expand Down

0 comments on commit 1a46112

Please sign in to comment.