Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HarikaChebrolu committed Nov 13, 2020
1 parent 0624f31 commit 3e4e559
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/unit/provider/oneview_ethernet_network_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@
'name' => 'EtherNetwork_Test1',
'connectionTemplateUri' => nil,
'autoLoginRedistribution' => true,
'vlanId' => '202'
'vlanId' => '202',
'networkUris' => ['/rest/ethernet-networks/123']
},
provider: 'c7000'
)
Expand All @@ -164,17 +165,16 @@
context 'given the min parameters' do
before(:each) do
ethernet_resource['data']['uri'] = '/rest/fake'
ethernet_resource['data']['networkUris'] = %w(test1 test2)
allow_any_instance_of(resource_types).to receive(:retrieve!).and_return(true)
allow(resource_types).to receive(:find_by).with(anything, ethernet_resource['data']).and_return([test])
allow(resource_types).to receive(:find_by).and_return([])
provider.exists?
end

it 'should delete multiple uris' do
allow_any_instance_of(resource_types).to receive(:bulk_delete_check).and_return(true)
allow_any_instance_of(resource_types).to receive(:bulk_create_check).and_return(false)
expect(provider.bulk_delete_check).to be
allow_any_instance_of(resource_types).to receive(:create).and_return(ethernet_resource)
allow_any_instance_of(resource_types).to receive(:create).and_return(test)
end
end
end

0 comments on commit 3e4e559

Please sign in to comment.