[PATCH conductor] Adds API entrypoints - Provider, Provider Accounts

pblaho at redhat.com pblaho at redhat.com
Thu Aug 23 16:15:54 UTC 2012


From: Petr Blaho <pblaho at redhat.com>

Adds tests too.
---
 src/app/views/api/entrypoint/index.xml.haml        |    2 ++
 .../controllers/api/entrypoint_controller_spec.rb  |    6 ++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/app/views/api/entrypoint/index.xml.haml b/src/app/views/api/entrypoint/index.xml.haml
index 597edbc..183ee31 100644
--- a/src/app/views/api/entrypoint/index.xml.haml
+++ b/src/app/views/api/entrypoint/index.xml.haml
@@ -5,3 +5,5 @@
   %pools{:href => api_pools_url}
   %provider_images{:href => api_provider_images_url}
   %target_images{:href => api_target_images_url}
+  %providers{:href => api_providers_url}
+  %provider_accounts{:href => api_provider_accounts_url}
diff --git a/src/spec/controllers/api/entrypoint_controller_spec.rb b/src/spec/controllers/api/entrypoint_controller_spec.rb
index c3425e0..ff2fbdf 100644
--- a/src/spec/controllers/api/entrypoint_controller_spec.rb
+++ b/src/spec/controllers/api/entrypoint_controller_spec.rb
@@ -37,14 +37,16 @@ describe Api::EntrypointController do
 
       it { response.should be_success }
       it { response.headers['Content-Type'].should include("application/xml") }
-      it {
+      it "should have all resources URLs" do
         resp = Hash.from_xml(response.body)
         api = resp['api']
         api['images']['href'].should == api_images_url
         api['builds']['href'].should == api_builds_url
         api['target_images']['href'].should == api_target_images_url
         api['provider_images']['href'].should == api_provider_images_url
-      }
+        api['providers']['href'].should == api_providers_url
+        api['provider_accounts']['href'].should == api_provider_accounts_url
+      end
     end
   end
 end
-- 
1.7.7.6




More information about the aeolus-devel mailing list