blob: 4b066088c48c1849ddca5b36e70ef433ca2db1cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
@api @api_environments @environments_create
Feature: Create an Environment via the REST API
In order to create environments programatically
As a developer
I want to create environments via the REST API
Scenario: Create a new environment
Given I am an administrator
And an 'environment' named 'cucumber'
When I 'POST' the 'environment' to the path '/environments'
Then the inflated responses key 'uri' should match 'http://.+/environments/cucumber'
Scenario: Create an environment that already exists
Given I am an administrator
And an 'environment' named 'cucumber'
When I 'POST' the 'environment' to the path '/environments'
And I 'POST' the 'environment' to the path '/environments'
Then I should get a '409 "Conflict"' exception
Scenario: Create an environment with the wrong private key
Given I am an administrator
And an 'environment' named 'cucumber'
When I 'POST' the 'environment' to the path '/environments' using a wrong private key
Then I should get a '401 "Unauthorized"' exception
Scenario: Create an environment as a non-admin
Given I am a non-admin
And an 'environment' named 'cucumber'
When I 'POST' the 'environment' to the path '/environments'
Then I should get a '403 "Forbidden"' exception
|