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

WIP: Adding get tests for checks

Currently one of the tests fail, pushing progress.  Working
test commit to follow soon.
This commit is contained in:
Daniel Reichert 2013-07-26 09:56:24 -07:00
parent 928e19d716
commit 6368faf8cf

View file

@ -1,4 +1,4 @@
Shindo.tests('Fog::Rackspace::Monitoring | check_tests', ['rackspace', 'rackspace_monitoring']) do
Shindo.tests('Fog::Rackspace::Monitoring | check_tests', ['rackspace', 'rackspacemonitoring']) do
pending if Fog.mocking?
account = Fog::Rackspace::Monitoring.new
@ -10,6 +10,9 @@ Shindo.tests('Fog::Rackspace::Monitoring | check_tests', ['rackspace', 'rackspac
check_id = response[:headers]['X-Object-ID']
response
end
tests('#get check').formats(LIST_HEADERS_FORMAT) do
account.get_check(entity_id,check_id).data
end
tests('#update check').formats(DATA_FORMAT) do
options = { :label => "Bar"}
account.update_check(entity_id,check_id,options).data
@ -22,6 +25,9 @@ Shindo.tests('Fog::Rackspace::Monitoring | check_tests', ['rackspace', 'rackspac
tests('#create new check(-1)').raises(Fog::Rackspace::Monitoring::BadRequest) do
account.create_check(entity_id, {:type => ""})
end
tests('#get check(-1)').raises(Fog::Rackspace::Monitoring::NotFound) do
account.get_check(-1, -1)
end
tests('#update invalid check(-1)').raises(Fog::Rackspace::Monitoring::NotFound) do
options = { :testing => "Bar" }
response = account.update_check(-1,-1,options)