Skip to content

Commit

Permalink
Merge pull request #9231 from jrafanie/rails7_test_fixes
Browse files Browse the repository at this point in the history
Rails7 test fixes
  • Loading branch information
Fryguy authored Aug 6, 2024
2 parents a941ba5 + 63dae15 commit 3e816bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions spec/controllers/vm_cloud_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@
post :explorer
expect(response.status).to eq(200)
expect_any_instance_of(GtlHelper).to receive(:render_gtl).with match_gtl_options(
:model_name => 'ManageIQ::Providers::CloudManager::Vm',
:model_name => 'VmOrTemplate',
:selected_records => [vm_openstack_tmd.id],
:report_data_additional_options => {
:model => 'ManageIQ::Providers::CloudManager::Vm',
:model => 'VmOrTemplate',
:lastaction => 'show_list',
}
)
Expand Down
6 changes: 3 additions & 3 deletions spec/controllers/vm_infra_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

let(:custom_attr1) do
FactoryBot.create(
:custom_attribute,
:ems_custom_attribute,
:resource => vm_vmware,
:name => 'Proč by si jeden nepokrad',
:value => 'jó, v tom je Pepa demokrat'
Expand All @@ -65,7 +65,7 @@

let(:custom_attr2) do
FactoryBot.create(
:custom_attribute,
:ems_custom_attribute,
:resource => vm_vmware,
:name => nil,
:value => 'a šikulovi má být dána šance'
Expand All @@ -75,7 +75,7 @@
# http://localhost:3000/vm_infra/show/10000000000449
it 'can display VM details for vm with ems_custom_attributes and a null attribute name' do
vm_vmware.ems_custom_attributes.push(custom_attr1, custom_attr2)
expect(controller).to receive(:identify_record).and_return(vm_vmware)
expect(controller).to receive(:identify_record).twice.and_return(vm_vmware)

get :show, :params => { :id => vm_vmware.id }
expect(response).to redirect_to(:action => 'explorer')
Expand Down

0 comments on commit 3e816bd

Please sign in to comment.