-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
4 changed files
with
77 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"adminCanAccess": true, | ||
"adminCanEdit": true, | ||
"adminCanView": true, | ||
"custom": false, | ||
"dataType": "STRING", | ||
"description": "QAAdded Attribute", | ||
"displayName": "QAAdded Attribute", | ||
"editType": [ | ||
"ADMIN", | ||
"USER" | ||
], | ||
"name": "qaattribute", | ||
"origin": "gluuPerson", | ||
"oxMultiValuedAttribute": false, | ||
"requred": false, | ||
"status": "ACTIVE", | ||
"urn": "urn:mace:dir:attribute-def:qaattribute", | ||
"userCanAccess": true, | ||
"userCanEdit": true, | ||
"userCanView": true, | ||
"viewType": [ | ||
"ADMIN", | ||
"USER" | ||
], | ||
"whitePagesCanView": false | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
Feature: Attributes | ||
|
||
@CreateUpdateDelete | ||
Scenario: Create new attribute | ||
Given url attributes_url | ||
And header Authorization = 'Bearer ' + accessToken | ||
And request read('classpath:attribute.json') | ||
When method POST | ||
Then status 201 | ||
Then def result = response | ||
Then set result.displayName = 'UpdatedQAAddedAttribute' | ||
Then def inum_before = result.inum | ||
Given url attributes_url | ||
And header Authorization = 'Bearer ' + accessToken | ||
And request result | ||
When method PUT | ||
Then status 200 | ||
And assert response.displayName == 'UpdatedQAAddedAttribute' | ||
And assert response.inum == inum_before | ||
Given url attributes_url + '/' +response.inum | ||
And header Authorization = 'Bearer ' + accessToken | ||
When method DELETE | ||
Then status 204 | ||
|
||
Scenario: Delete a non-existion attribute by inum | ||
Given url attributes_url + '/1402.66633-8675-473e-a749' | ||
And header Authorization = 'Bearer ' + accessToken | ||
When method GET | ||
Then status 404 | ||
|
||
|
||
Scenario: Get an attribute by inum(unexisting attribute) | ||
Given url attributes_url + '/53553532727272772' | ||
And header Authorization = 'Bearer ' + accessToken | ||
When method GET | ||
Then status 404 | ||
|
||
Scenario: Get an attribute by inum | ||
Given url attributes_url | ||
And header Authorization = 'Bearer ' + accessToken | ||
When method GET | ||
Then status 200 | ||
Given url attributes_url + '/' +response[0].inum | ||
And header Authorization = 'Bearer ' + accessToken | ||
When method GET | ||
Then status 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters