1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

* Added Network collection Shindo tests

* Fixed PBD and PIF tests descriptions
This commit is contained in:
Sergio Rubio 2012-04-02 14:03:12 +02:00
parent 19b927ba4f
commit df985aec67
3 changed files with 24 additions and 2 deletions

View file

@ -0,0 +1,22 @@
Shindo.tests('Fog::Compute[:xenserver] | Networks collection', ['networks']) do
conn = Fog::Compute[:xenserver]
tests('The networks collection') do
networks = conn.networks.all
test('should not be empty') { !networks.empty? }
test('should be a kind of Fog::Compute::XenServer::Networks') { networks.kind_of? Fog::Compute::XenServer::Networks }
tests('should be able to reload itself').succeeds { networks.reload }
tests('should be able to get a model') do
tests('by reference').succeeds {
networks.get(networks.first.reference).is_a? Fog::Compute::XenServer::Network
}
end
end
end

View file

@ -1,4 +1,4 @@
Shindo.tests('Fog::Compute[:network] | network model', ['network']) do
Shindo.tests('Fog::Compute[:xenserver] | PBD model', ['PBD']) do
pbds = Fog::Compute[:xenserver].pbds
pbd = pbds.first

View file

@ -1,4 +1,4 @@
Shindo.tests('Fog::Compute[:network] | network model', ['network']) do
Shindo.tests('Fog::Compute[:xenserver] | PIF model', ['PIF']) do
pifs = Fog::Compute[:xenserver].pifs
pif = pifs.first