From 605295f361f7b2e5251745bd850e89010df62a20 Mon Sep 17 00:00:00 2001 From: Jay Faulkner Date: Fri, 19 Jul 2013 13:13:50 -0700 Subject: [PATCH] tests(list_notification_plans): Added basic tests * Added a single passing + single failing test for list_notification_plans --- tests/rackspace/requests/monitoring/list_tests.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/rackspace/requests/monitoring/list_tests.rb b/tests/rackspace/requests/monitoring/list_tests.rb index 4d8bb33df..b58e1aebf 100644 --- a/tests/rackspace/requests/monitoring/list_tests.rb +++ b/tests/rackspace/requests/monitoring/list_tests.rb @@ -20,24 +20,30 @@ Shindo.tests('Fog::Rackspace::Monitoring | list_tests', ['rackspace','rackspace_ tests('#get overview list').formats(LIST_HEADERS_FORMAT) do account.list_overview().data[:headers] end + tests('#list notification plans').formats(LIST_HEADERS_FORMAT) do + account.list_notification_plans().data[:headers] + end end tests('failure') do tests('#fail to list checks').raises(Fog::Rackspace::Monitoring::NotFound) do account.list_checks(-1) end - tests('#fail to list check types').raises(Fog::Rackspace::Monitoring::ArgumentError) do + tests('#fail to list check types').raises(ArgumentError) do account.list_check_types(-1) end - tests('#fail to list entities').raises(Fog::Rackspace::Monitoring::ArgumentError) do + tests('#fail to list entities').raises(ArgumentError) do account.list_entities(-1) end # This test has been put on hold due to a bug that incorrectly returns 200 OK to this request #tests('#fail to list metrics').raises(Fog::Rackspace::Monitoring::NotFound) do #account.list_metrics(-1,-1) #end - tests('#fail to list overview').raises(Fog::Rackspace::Monitoring::NoMethodError) do + tests('#fail to list overview').raises(NoMethodError) do account.list_overview(-1) end + tests('#fail: 1 argument instead of 0 for list_notification_plans').raises(ArgumentError) do + account.list_notification_plans('fail') + end end account.delete_check(entity_id,check_id) account.delete_entity(entity_id)