1
0
Fork 0
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:
Kevin Olbrich 2014-01-04 02:58:47 +00:00
parent 552e59caa4
commit 17137f4f54
2 changed files with 20 additions and 0 deletions

View 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

View 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