summaryrefslogtreecommitdiff
path: root/features/api/roles/show_roles_api.feature
blob: 5a7a5e27340b6f064e3cef24641b2998302c35f7 (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
@api @api_roles @roles_show
Feature: Show a role via the REST API 
  In order to know what the details are for a Role 
  As a Developer
  I want to show the details for a specific Role
  
  Scenario: Show a role
    Given a 'registration' named 'bobo' exists
      And a 'role' named 'webserver' exists
     When I 'GET' the path '/roles/webserver'
     Then the inflated response should respond to 'name' with 'webserver'

  Scenario: Show a missing role
    Given a 'registration' named 'bobo' exists
      And there are no roles 
     When I 'GET' the path '/roles/bobo'
     Then I should get a '404 "Not Found"' exception

  Scenario: Show a role with a wrong private key
    Given a 'registration' named 'bobo' exists
      And a 'role' named 'webserver' exists
     When I 'GET' the path '/roles/webserver' using a wrong private key
     Then I should get a '401 "Unauthorized"' exception