diff options
author | sdelano <stephen@opscode.com> | 2011-03-10 11:44:59 -0800 |
---|---|---|
committer | sdelano <stephen@opscode.com> | 2011-03-10 12:55:38 -0800 |
commit | 8719968f2af2979e8b957603db3d1944879a44d6 (patch) | |
tree | 7905b34099b698befb9f19925dc77affc02b349f /features | |
parent | e362464606af878bde3613f3e75dcd59d42432fa (diff) | |
download | chef-8719968f2af2979e8b957603db3d1944879a44d6.tar.gz |
cookbook api feature tests:
* upload cookbooks as admin
* get a 404 because the cookbook isn't there,
not because merb cant find the route
Diffstat (limited to 'features')
-rw-r--r-- | features/api/cookbooks/delete_cookbooks.feature | 2 | ||||
-rw-r--r-- | features/api/cookbooks/list_cookbooks.feature | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/features/api/cookbooks/delete_cookbooks.feature b/features/api/cookbooks/delete_cookbooks.feature index dd95b6f638..1a08a2c0e2 100644 --- a/features/api/cookbooks/delete_cookbooks.feature +++ b/features/api/cookbooks/delete_cookbooks.feature @@ -49,6 +49,6 @@ Feature: CRUD cookbooks @delete_cookbook_negative Scenario: I should not be able to delete a cookbook that doesn't exist' Given I am an administrator - When I 'DELETE' to the path '/cookbooks/testcookbook_nonexistent' + When I 'DELETE' to the path '/cookbooks/testcookbook_nonexistent/1.2.3' Then I should get a '404 "Not Found"' exception diff --git a/features/api/cookbooks/list_cookbooks.feature b/features/api/cookbooks/list_cookbooks.feature index 52e7e581ca..df9188b68f 100644 --- a/features/api/cookbooks/list_cookbooks.feature +++ b/features/api/cookbooks/list_cookbooks.feature @@ -6,8 +6,9 @@ Feature: List cookbooks via the REST API I want to be able to list all cookbooks via the REST API Scenario Outline: List all cookbooks - Given I am <user_type> + Given I am an administrator And I upload multiple versions of the 'version_test' cookbook + And I am <user_type> When I 'GET' the path '/cookbooks' Then the inflated responses key 'version_test' sub-key 'url' should match 'http://.+/cookbooks/version_test' And the inflated responses key 'version_test' sub-key 'versions' item '0' sub-key 'url' should match 'http://.+/cookbooks/version_test/(\d+.\d+.\d+)' |