diff options
author | Azul <azul@leap.se> | 2014-07-08 11:00:40 +0200 |
---|---|---|
committer | Azul <azul@leap.se> | 2014-07-14 10:49:39 +0200 |
commit | 303ec07901af3798efc873cbe050aa5cb4ba7655 (patch) | |
tree | 4c9a2d33d2bf1b24233d115e74368a533acf7666 /features/config.feature | |
parent | 4dbfdf30c3235eb19e4f0ad959f65125ed18b39a (diff) |
use cucumber; initial ConfigsController
Diffstat (limited to 'features/config.feature')
-rw-r--r-- | features/config.feature | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/features/config.feature b/features/config.feature new file mode 100644 index 0000000..2d237f2 --- /dev/null +++ b/features/config.feature @@ -0,0 +1,39 @@ +Feature: Download Provider Configuration + + The LEAP Provider exposes parts of its configuration through the API. + + This can be used to find out about services offered. The big picture can be retrieved from `/provider.json`. More detailed settings of the services are available after authentication. You can get a list of the available settings from `/1/configs.json`. + + Background: + Given I set headers: + | Accept | application/json | + | Content-Type | application/json | + + @tempfile + Scenario: Fetch provider config + Given the provider config is: + """ + {"config": "me"} + """ + When I send a GET request to "/provider.json" + Then the response status should be "200" + And the response should be: + """ + {"config": "me"} + """ + + Scenario: Missing provider config + When I send a GET request to "/provider.json" + Then the response status should be "404" + And the response should be: + """ + {"error": "not found"} + """ + + Scenario: Authentication required for list of configs + When I send a GET request to "/1/configs" + Then the response status should be "401" + And the response should be: + """ + {"error": "Please log in to perform that action."} + """ |