summaryrefslogtreecommitdiff
path: root/features/api
diff options
context:
space:
mode:
authorsdelano <stephen@opscode.com>2010-08-24 14:39:14 -0700
committerSeth Falcon <seth@opscode.com>2010-11-01 10:44:48 -0700
commit89f44722091dc2d0755aa406d3b554a619461a49 (patch)
treee667c1098b7cc1063a47f178bfb73c4de16fa302 /features/api
parentaf8a0f062729c341efea42bbdd7dc90cd6b1d591 (diff)
downloadchef-89f44722091dc2d0755aa406d3b554a619461a49.tar.gz
make the default environment immutable
Diffstat (limited to 'features/api')
-rw-r--r--features/api/environments/delete_environment_api.feature10
-rw-r--r--features/api/environments/update_environment_api.feature11
2 files changed, 21 insertions, 0 deletions
diff --git a/features/api/environments/delete_environment_api.feature b/features/api/environments/delete_environment_api.feature
index e4cc58a82d..f4d84ea1b2 100644
--- a/features/api/environments/delete_environment_api.feature
+++ b/features/api/environments/delete_environment_api.feature
@@ -26,3 +26,13 @@ Feature: Delete environments via the REST API
And an 'environment' named 'cucumber' exists
When I 'DELETE' the path '/environments/cucumber'
Then I should get a '403 "Forbidden"' exception
+
+ Scenario Outline: Delete the '_default' environment
+ Given I am <user_type>
+ When I 'DELETE' the path '/environments/_default'
+ Then I should get a '403 "Forbidden"' exception
+
+ Examples:
+ | user_type |
+ | an administrator |
+ | a non-admin |
diff --git a/features/api/environments/update_environment_api.feature b/features/api/environments/update_environment_api.feature
index 73a9535d3e..0ec16695d9 100644
--- a/features/api/environments/update_environment_api.feature
+++ b/features/api/environments/update_environment_api.feature
@@ -38,3 +38,14 @@ Feature: Update an environment via the REST API
And sending the method 'description' to the 'environment' with 'This will not work'
When I 'PUT' the 'environment' to the path '/environments/cucumber'
Then I should get a '403 "Forbidden"' exception
+
+ Scenario Outline: Update the '_default' environment
+ Given I am <user_type>
+ And an 'environment' named 'cucumber'
+ When I 'PUT' the 'environment' to the path '/environments/_default'
+ Then I should get a '403 "Forbidden"' exception
+
+ Examples:
+ | user_type |
+ | an administrator |
+ | a non-admin |