Skip to content

Commit

Permalink
Changes in test cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jyothis Gireesan Mini committed Mar 22, 2018
1 parent 619743e commit 65ba864
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/shared_samples/network_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
network_set['networkUris'].each { |network| puts "- networkUri='#{network}'" }

# only for API300 and API500
if @client.api_version.to_i >= 300 and @client.api_version.to_i <= 500
if @client.api_version.to_i >= 300 && @client.api_version.to_i <= 500
# Scope class used in this sample
scope_class = OneviewSDK.resource_named('Scope', @client.api_version)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
let(:ethernet_class) { OneviewSDK::API600::C7000::EthernetNetwork }

include_examples 'NetworkSetUpdateExample', 'integration api600 context'
end
end
9 changes: 9 additions & 0 deletions spec/unit/resource/api600/c7000/network_set_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,13 @@
it 'inherits from OneviewSDK::API500::C7000::NetworkSet' do
expect(described_class).to be < OneviewSDK::API500::C7000::NetworkSet
end

describe '#initialize' do
context 'OneView 4.00' do
it 'sets the defaults correctly' do
network_set = described_class.new(@client_600)
expect(network_set[:type]).to eq('network-setV4')
end
end
end
end
13 changes: 11 additions & 2 deletions spec/unit/resource/api600/synergy/network_set_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@
RSpec.describe OneviewSDK::API600::Synergy::NetworkSet do
include_context 'shared context'

it 'inherits from OneviewSDK::API500::Synergy::NetworkSet' do
expect(described_class).to be < OneviewSDK::API500::Synergy::NetworkSet
it 'inherits from OneviewSDK::API600::C7000::NetworkSet' do
expect(described_class).to be < OneviewSDK::API600::C7000::NetworkSet
end

describe '#initialize' do
context 'OneView 4.00' do
it 'sets the defaults correctly' do
network_set = described_class.new(@client_600)
expect(network_set[:type]).to eq('network-setV4')
end
end
end
end

0 comments on commit 65ba864

Please sign in to comment.