diff options
Diffstat (limited to 'features')
-rw-r--r-- | features/1/authentication.feature | 4 | ||||
-rw-r--r-- | features/1/unauthenticated.feature | 3 | ||||
-rw-r--r-- | features/authentication.feature | 4 | ||||
-rw-r--r-- | features/unauthenticated.feature | 17 |
4 files changed, 20 insertions, 8 deletions
diff --git a/features/1/authentication.feature b/features/1/authentication.feature index 52b562f..a6e5538 100644 --- a/features/1/authentication.feature +++ b/features/1/authentication.feature @@ -13,12 +13,12 @@ Feature: Authentication Given I authenticated And I set headers: | Authorization | Token token="MY_AUTH_TOKEN" | - When I send a GET request to "/1/configs.json" + When I send a GET request to "/1/service" Then the response status should be "200" Scenario: Submitting an invalid token Given I authenticated And I set headers: | Authorization | Token token="InvalidToken" | - When I send a GET request to "/1/configs.json" + When I send a GET request to "/1/service" Then the response status should be "401" diff --git a/features/1/unauthenticated.feature b/features/1/unauthenticated.feature index aea7117..a135f14 100644 --- a/features/1/unauthenticated.feature +++ b/features/1/unauthenticated.feature @@ -16,7 +16,7 @@ Feature: Unauthenticated API endpoints And the response should be that config Scenario: Authentication required response - When I send a GET request to "/1/configs" + When I send a GET request to "/1/configs/config_id.json" Then the response status should be "401" And the response should have "error" with "not_authorized_login" And the response should have "message" @@ -24,7 +24,6 @@ Feature: Unauthenticated API endpoints Scenario: Authentication required for all other API endpoints (incomplete) Given I am not logged in When I send requests to these endpoints: - | GET | /1/configs | | GET | /1/configs/config_id.json | | GET | /1/service | | DELETE | /1/logout | diff --git a/features/authentication.feature b/features/authentication.feature index 806e2b7..4dc6c78 100644 --- a/features/authentication.feature +++ b/features/authentication.feature @@ -13,12 +13,12 @@ Feature: Authentication Given I authenticated And I set headers: | Authorization | Token token="MY_AUTH_TOKEN" | - When I send a GET request to "/2/configs.json" + When I send a GET request to "/2/service" Then the response status should be "200" Scenario: Submitting an invalid token Given I authenticated And I set headers: | Authorization | Token token="InvalidToken" | - When I send a GET request to "/2/configs.json" + When I send a GET request to "/2/service" Then the response status should be "401" diff --git a/features/unauthenticated.feature b/features/unauthenticated.feature index b4b0f55..a55faa7 100644 --- a/features/unauthenticated.feature +++ b/features/unauthenticated.feature @@ -15,8 +15,22 @@ Feature: Unauthenticated API endpoints Then the response status should be "200" And the response should be that config + Scenario: Fetch list of available configs + When I send a GET request to "/2/configs.json" + Then the response status should be "200" + And the response should be: + """ + { + "services": { + "soledad": "/2/configs/soledad-service.json", + "eip": "/2/configs/eip-service.json", + "smtp": "/2/configs/smtp-service.json" + } + } + """ + Scenario: Authentication required response - When I send a GET request to "/2/configs" + When I send a GET request to "/2/configs/config_id.json" Then the response status should be "401" And the response should have "error" with "not_authorized_login" And the response should have "message" @@ -24,7 +38,6 @@ Feature: Unauthenticated API endpoints Scenario: Authentication required for all other API endpoints (incomplete) Given I am not logged in When I send requests to these endpoints: - | GET | /2/configs | | GET | /2/configs/config_id.json | | GET | /2/service | | DELETE | /2/logout | |