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:
parent
d78c5b541d
commit
552e59caa4
3 changed files with 20 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
13
tests/joyent/models/analytics/joyent_modules_tests.rb
Normal file
13
tests/joyent/models/analytics/joyent_modules_tests.rb
Normal 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
|
Loading…
Add table
Reference in a new issue