summaryrefslogtreecommitdiffstats
path: root/build/integration/features/provisioning-v1.feature
blob: 448c06b8b518d2af510c924382ffa6d2b1e7ca6a (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
Feature: provisioning
  Background:
    Given using api version "1"

  Scenario: Getting an not existing user
    Given As an "admin"
    When sending "GET" to "/cloud/users/test"
    Then the OCS status code should be "998"
    And the HTTP status code should be "200"

  Scenario: Listing all users
    Given As an "admin"
    When sending "GET" to "/cloud/users"
    Then the OCS status code should be "100"
    And the HTTP status code should be "200"

  Scenario: Create a user
    Given As an "admin"
    And user "brand-new-user" does not exist
    When sending "POST" to "/cloud/users" with
      | userid | brand-new-user |
      | password | 123456 |
    Then the OCS status code should be "100"
    And the HTTP status code should be "200"
    And user "brand-new-user" exists

  Scenario: Create an existing user
    Given As an "admin"
    And user "brand-new-user" exists
    When sending "POST" to "/cloud/users" with
      | userid | brand-new-user |
      | password | 123456 |
    Then the OCS status code should be "102"
    And the HTTP status code should be "200"

  Scenario: Get an existing user
    Given As an "admin"
    When sending "GET" to "/cloud/users/brand-new-user"
    Then the OCS status code should be "100"
    And the HTTP status code should be "200"


  Scenario: Getting all users
    Given As an "admin"
    When sending "GET" to "/cloud/users"
    And users returned are
      | brand-new-user | ser507 |


  Scenario: Edit a user
    Given As an "admin"
    And user "brand-new-user" exists
    When sending "PUT" to "/cloud/users/brand-new-user" with
      | key | quota |
      | value | 12MB |
      | key | email |
      | value | brand-new-user@gmail.com |
    Then the OCS status code should be "100"
    And the HTTP status code should be "200"
    And user "brand-new-user" exists


  Scenario: Delete a user
    Given As an "admin"
    And user "brand-new-user" exists
    When sending "DELETE" to "/cloud/users/brand-new-user" 
    Then the OCS status code should be "100"
    And the HTTP status code should be "200"
    And user "brand-new-user" does not exist


  Scenario: Create a group
    Given As an "admin"
    And group "new-group" does not exist
    When sending "POST" to "/cloud/groups" with
      | groupid | new-group |
      | password | 123456 |

    Then the OCS status code should be "100"
    And the HTTP status code should be "200"
    And group "new-group" exists


  Scenario: Delete a group
    Given As an "admin"
    And group "new-group" exists
    When sending "DELETE" to "/cloud/groups/new-group"
    Then the OCS status code should be "100"
    And the HTTP status code should be "200"
    And group "new-group" does not exist