Merged in cochalo/processmaker (pull request #57)

Arreglos y adicion de behat
This commit is contained in:
Fernando Ontiveros
2014-01-07 16:46:44 -04:00
3 changed files with 65 additions and 43 deletions

View File

@@ -1,5 +1,5 @@
@ProcessMakerMichelangelo @RestAPI
Feature: Testing triggers
Feature: Testing events
@1: TEST FOR POST EVENT /----------------------------------------------------------------------
Scenario: Create a event
@@ -24,6 +24,7 @@ Feature: Testing triggers
Then the response status code should be 201
And store "evn_uid" in session array
@2: TEST FOR PUT EVENT /-----------------------------------------------------------------------
Scenario: Update a event
Given that I have a valid access_token
@@ -58,4 +59,14 @@ Feature: Testing triggers
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "object"
And that "evn_description" is set to "change description"
And that "evn_description" is set to "change description"
@4: TEST FOR DELETE EVENT /-----------------------------------------------------------------------
Scenario: Delete a event
Given that I have a valid access_token
And that I want to delete a resource with the key "evn_uid" stored in session array
And I request "project/251815090529619a99a2bf4013294414/event"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "object"

View File

@@ -1,21 +1,55 @@
@ProcessMakerMichelangelo @RestAPI
Feature: Triggers Resources
Background:
Given that I have a valid access_token
Scenario: Get a List of triggers of a project
Given this scenario is not implemented yet
Scenario: Get a single trigger of a project
Given this scenario is not implemented yet
Scenario: Create a new trigger for a project
Given this scenario is not implemented yet
Scenario: Update a trigger of a project
Given this scenario is not implemented yet
Feature: Testing triggers
Scenario: Delete a trigger of a project
Given this scenario is not implemented yet
@1: TEST FOR POST TRIGGER /--------------------------------------------------------------------
Scenario: Create a trigger
Given that I have a valid access_token
And POST this data:
"""
{
"tri_title": "nuevo trigger",
"tri_description": "descripcion"
}
"""
And I request "project/251815090529619a99a2bf4013294414/trigger"
Then the response status code should be 201
And store "tri_uid" in session array
@2: TEST FOR PUT TRIGGER /-----------------------------------------------------------------------
Scenario: Update a trigger
Given that I have a valid access_token
And PUT this data:
"""
{
"tri_title": "trigger editado",
"tri_description": "descripcion editada"
}
"""
And that I want to update a resource with the key "tri_uid" stored in session array
And I request "project/251815090529619a99a2bf4013294414/trigger"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "object"
@3: TEST FOR GET TRIGGER /-----------------------------------------------------------------------
Scenario: Get a trigger
Given that I have a valid access_token
And that I want to get a resource with the key "tri_uid" stored in session array
And I request "project/251815090529619a99a2bf4013294414/trigger"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "object"
And that "tri_title" is set to "trigger editado"
And that "tri_description" is set to "descripcion editada"
@4: TEST FOR DELETE TRIGGER /-----------------------------------------------------------------------
Scenario: Get a trigger
Given that I have a valid access_token
And that I want to delete a resource with the key "tri_uid" stored in session array
And I request "project/251815090529619a99a2bf4013294414/trigger"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "object"

View File

@@ -1,23 +0,0 @@
@ProcessMakerMichelangelo @RestAPI
Feature: Testing triggers
Scenario: List triggers of an project
Given that I have a valid access_token
And I request "project/534152995521df6bb5986c4062665559/triggers"
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
Scenario: Create a trigger
Given that I have a valid access_token
And POST this data:
"""
{
"tri_title": "nuevo triggerr",
"tri_description": "descripcion"
}
"""
And I request "project/534152995521df6bb5986c4062665559/trigger"
Then the response status code should be 201