mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
tests for fields and joyent_module
This commit is contained in:
parent
552e59caa4
commit
17137f4f54
2 changed files with 20 additions and 0 deletions
10
tests/joyent/models/analytics/field_tests.rb
Normal file
10
tests/joyent/models/analytics/field_tests.rb
Normal file
|
@ -0,0 +1,10 @@
|
|||
Shindo.tests("Fog::Joyent[:analytics] | field", %w{joyent analytics}) do
|
||||
@analytics = Fog::Joyent[:analytics]
|
||||
@field = @analytics.fields.first
|
||||
|
||||
tests('read only') do
|
||||
returns(false, 'should not save') { @field.respond_to?(:save)}
|
||||
returns(false, 'should not allow creating a new one') { @field.respond_to?(:create)}
|
||||
returns(false, 'should not allow destroying') { @field.respond_to?(:destroy)}
|
||||
end
|
||||
end
|
10
tests/joyent/models/analytics/joyent_module_tests.rb
Normal file
10
tests/joyent/models/analytics/joyent_module_tests.rb
Normal file
|
@ -0,0 +1,10 @@
|
|||
Shindo.tests("Fog::Joyent[:analytics] | joyent_module", %w{joyent analytics}) do
|
||||
@analytics = Fog::Joyent[:analytics]
|
||||
@joyent_module = @analytics.joyent_modules.first
|
||||
|
||||
tests('read only') do
|
||||
returns(false, 'should not save') { @joyent_module.respond_to?(:save)}
|
||||
returns(false, 'should not allow creating a new one') { @joyent_module.respond_to?(:create)}
|
||||
returns(false, 'should not allow destroying') { @joyent_module.respond_to?(:destroy)}
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue