2013-07-29 14:50:41 -07:00
|
|
|
Shindo.tests('Fog::Rackspace::Monitoring | alarm_example', ['rackspace','rackspace_monitoring']) do
|
2013-07-29 14:47:52 -07:00
|
|
|
|
2013-07-26 12:42:11 -07:00
|
|
|
service = Fog::Rackspace::Monitoring.new
|
2013-07-29 14:47:52 -07:00
|
|
|
alarm_example_id = 'remote.http_body_match_1'
|
|
|
|
alarm = service.alarm_examples.get(alarm_example_id)
|
2013-07-26 12:42:11 -07:00
|
|
|
|
2013-07-29 14:47:52 -07:00
|
|
|
tests('#bound?') do
|
|
|
|
tests('should return false if not bound') do
|
|
|
|
returns(false) {alarm.bound?}
|
2013-07-26 12:42:11 -07:00
|
|
|
end
|
2013-07-29 14:47:52 -07:00
|
|
|
tests('should return true if bound') do
|
|
|
|
values = {'string' => '12345'}
|
|
|
|
alarm = service.alarm_examples.evaluate(alarm_example_id,values)
|
|
|
|
returns(true) {alarm.bound?}
|
2013-07-26 12:42:11 -07:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|