From 1edc5b8f4126a185cb3f99d225e4bb0eb062bfe0 Mon Sep 17 00:00:00 2001 From: Freddy Daniel Rojas Valda Date: Fri, 10 Jan 2014 14:16:16 -0400 Subject: [PATCH] BEHAT para OUTPUTDOCUMENTS --- .../output_document.feature | 84 +++++++++++++++++-- .../Project/ProcessSupervisors.php | 4 - 2 files changed, 77 insertions(+), 11 deletions(-) diff --git a/features/backend/output_documents_resources/output_document.feature b/features/backend/output_documents_resources/output_document.feature index 43c9a2950..d3f7d5569 100644 --- a/features/backend/output_documents_resources/output_document.feature +++ b/features/backend/output_documents_resources/output_document.feature @@ -18,11 +18,81 @@ Feature: Output Documents Resources And the type is "object" Scenario: Create a new output document for a project - Given this scenario is not implemented yet - - Scenario: Update a output document for a project - Given this scenario is not implemented yet - - Scenario: Delete a output document of a project - Given this scenario is not implemented yet + Given POST this data: + """ + { + "out_doc_title": "Output doc #1", + "out_doc_description": "Output doc #1 - Desc", + "out_doc_filename": "od_generated_1", + "out_doc_template": "", + "out_doc_report_generator": "HTML2PDF", + "out_doc_landscape": 0, + "out_doc_media": "Letter", + "out_doc_left_margin": 0, + "out_doc_right_margin": 0, + "out_doc_top_margin": 0, + "out_doc_bottom_margin": 0, + "out_doc_generate": "BOTH", + "out_doc_type": "HTML", + "out_doc_current_revision": 0, + "out_doc_field_mapping": "", + "out_doc_versioning": 0, + "out_doc_destination_path": "", + "out_doc_tags": "", + "out_doc_pdf_security_enabled": 0, + "out_doc_pdf_security_open_password": "", + "out_doc_pdf_security_owner_password": "", + "out_doc_pdf_security_permissions": "" + } + """ + And I request "project/4224292655297723eb98691001100052/output-document" + Then the response status code should be 201 + And the response charset is "UTF-8" + And the content type is "application/json" + And the type is "object" + And store "out_doc_uid" in session array as variable "out_doc_uid" + + Scenario: Update a output document for a project + Given PUT this data: + """ + { + "out_doc_title": "Output doc #1", + "out_doc_description": "Output doc #1 - Desc DESCRIPTION Modified", + "out_doc_filename": "od_generated_1", + "out_doc_template": "", + "out_doc_report_generator": "HTML2PDF", + "out_doc_landscape": 0, + "out_doc_media": "Letter", + "out_doc_left_margin": 0, + "out_doc_right_margin": 0, + "out_doc_top_margin": 0, + "out_doc_bottom_margin": 0, + "out_doc_generate": "BOTH", + "out_doc_type": "HTML", + "out_doc_current_revision": 0, + "out_doc_field_mapping": "", + "out_doc_versioning": 0, + "out_doc_destination_path": "", + "out_doc_tags": "", + "out_doc_pdf_security_enabled": 0, + "out_doc_pdf_security_open_password": "", + "out_doc_pdf_security_owner_password": "", + "out_doc_pdf_security_permissions": "" + } + """ + And that I want to update a resource with the key "out_doc_uid" stored in session array + And I request "project/4224292655297723eb98691001100052/output-document" + And the content type is "application/json" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "object" + And that "out_doc_description": "Output doc #1 - Desc DESCRIPTION Modified" + + Scenario: Delete a output document of a project + Given that I want to delete a resource with the key "out_doc_uid" stored in session array + And I request "project/4224292655297723eb98691001100052/output-document" + And the content type is "application/json" + Then the response status code should be 200 + And the response charset is "UTF-8" + diff --git a/workflow/engine/src/Services/Api/ProcessMaker/Project/ProcessSupervisors.php b/workflow/engine/src/Services/Api/ProcessMaker/Project/ProcessSupervisors.php index 3c9b680c9..2d7202fd6 100644 --- a/workflow/engine/src/Services/Api/ProcessMaker/Project/ProcessSupervisors.php +++ b/workflow/engine/src/Services/Api/ProcessMaker/Project/ProcessSupervisors.php @@ -311,8 +311,4 @@ class ProcessSupervisors extends Api } return $response; } - - - - }