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

tests for joyent_modules

This commit is contained in:
Kevin Olbrich 2014-01-04 02:34:17 +00:00
parent d78c5b541d
commit 552e59caa4
3 changed files with 20 additions and 2 deletions

View file

@ -84,7 +84,7 @@ module Fog
'requested_duration' => 30,
'requested_end_time' => Time.now.utc - 570
}
when :fields
when :describe_analytics
{
'fields' => {
'zonename' => {
@ -95,6 +95,11 @@ module Fog
'label' => 'process identifier',
'type' => 'string'
}
},
'modules' => {
'cpu' => {
'label' => 'CPU'
}
}
}
else

View file

@ -15,7 +15,7 @@ module Fog
def describe_analytics
response = Excon::Response.new
response.status = 200
response.body = self.data[:fields]
response.body = self.data[:describe_analytics]
response
end
end

View file

@ -0,0 +1,13 @@
Shindo.tests("Fog::Joyent[:analytics] | joyent_modules", %w{joyent}) do
@analytics = Fog::Joyent[:analytics]
@joyent_modules = @analytics.joyent_modules
tests('#all').succeeds do
@joyent_modules.all
end
tests('#new').succeeds do
@joyent_modules.new(['cpu', { 'label' => 'CPU' }])
end
end