From 2aa4b325afe5bbabeacf571e82c60a15f347a7b6 Mon Sep 17 00:00:00 2001 From: nightshade427 Date: Mon, 21 Mar 2011 16:43:47 -0400 Subject: [PATCH] more test passing --- lib/fog/compute/requests/linode/avail_stackscripts.rb | 4 +++- tests/compute/requests/linode/linode_tests.rb | 5 +++++ .../linode/{stack_scripts_tests.rb => stackscripts_tests.rb} | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) rename tests/compute/requests/linode/{stack_scripts_tests.rb => stackscripts_tests.rb} (91%) diff --git a/lib/fog/compute/requests/linode/avail_stackscripts.rb b/lib/fog/compute/requests/linode/avail_stackscripts.rb index 341a9bd3e..47a7b0a34 100644 --- a/lib/fog/compute/requests/linode/avail_stackscripts.rb +++ b/lib/fog/compute/requests/linode/avail_stackscripts.rb @@ -3,11 +3,13 @@ module Fog class Compute class Real def avail_stackscripts(options={}) - request( + result = request( :expects => 200, :method => 'GET', :query => { :api_action => 'avail.stackscripts' }.merge!(options) ) + result.body['DATA']['DISTRIBUTIONIDLIST'] = result.body['DATA']['DISTRIBUTIONIDLIST'].to_s + result end end end diff --git a/tests/compute/requests/linode/linode_tests.rb b/tests/compute/requests/linode/linode_tests.rb index 3a8dfde5e..6ced20c24 100644 --- a/tests/compute/requests/linode/linode_tests.rb +++ b/tests/compute/requests/linode/linode_tests.rb @@ -57,6 +57,11 @@ Shindo.tests('Linode::Compute | linode requests', ['linode']) do Linode[:compute].linode_list.body end + # tests('#linode_update').formats(@linodes_format) do + # pending if Fog.mocking? + # Linode[:compute].linode_update @linode_id, :label => 'testing' + # end + # tests("#linode_reboot(#{@linode_id})").formats(@reboot_format) do # Linode[:compute].linode_reboot(@linode_id).body # end diff --git a/tests/compute/requests/linode/stack_scripts_tests.rb b/tests/compute/requests/linode/stackscripts_tests.rb similarity index 91% rename from tests/compute/requests/linode/stack_scripts_tests.rb rename to tests/compute/requests/linode/stackscripts_tests.rb index 7ef6ede5a..547f75dc2 100644 --- a/tests/compute/requests/linode/stack_scripts_tests.rb +++ b/tests/compute/requests/linode/stackscripts_tests.rb @@ -16,11 +16,11 @@ Shindo.tests('Linode::Compute | stack_script requests', ['linode']) do 'ISPUBLIC' => Integer, 'USERID' => Integer }] - }) + }) tests('success') do - tests('#avail_stack_scripts').formats(@stack_scripts_format) do + tests('#stackscript_list').formats(@stack_scripts_format) do pending if Fog.mocking? Linode[:compute].stackscript_list.body end