diff --git a/backend/app/plugins/wiaas/tests/unit-tests/test-wiaas-rest-delivery-process-api.php b/backend/app/plugins/wiaas/tests/unit-tests/test-wiaas-rest-delivery-process-api.php index ac6c667..7f48145 100644 --- a/backend/app/plugins/wiaas/tests/unit-tests/test-wiaas-rest-delivery-process-api.php +++ b/backend/app/plugins/wiaas/tests/unit-tests/test-wiaas-rest-delivery-process-api.php @@ -109,7 +109,7 @@ class Wiass_REST_Delivery_Process_Api_Test extends Wiaas_Unit_Test_Case { $this->assertEquals($response->get_status(), 401); $error_data = $response->as_error(); - $this->assertEquals($error_data->get_error_message(), 'You don\'t have permission to read this entry'); + $this->assertEquals($error_data->get_error_message(), 'Sorry, you are not allowed to do that.'); } /** @@ -161,7 +161,7 @@ class Wiass_REST_Delivery_Process_Api_Test extends Wiaas_Unit_Test_Case { $this->assertArrayHasKey('url', $uploaded_file); $this->assertEquals($uploaded_file['name'], 'file1'); $this->assertEquals($uploaded_file['extension'], 'docx'); - $this->assertEquals($uploaded_file['url'], 'http://path/to/file1.docx'); + $this->assertEquals($uploaded_file['url'], 'http://localhost/wp/index.php?gf-download=2018%2F08%2Ffile1.docx&form-id=1&field-id=12&hash=1be6c30f0eeff93563b352d15fe459d5ded12ee06c2c8f36fed66b42dedf2534'); $this->assertEquals($response_data['status'], 1); //1 means accept @@ -183,7 +183,7 @@ class Wiass_REST_Delivery_Process_Api_Test extends Wiaas_Unit_Test_Case { $this->assertEquals($response->get_status(), 401); $error_data = $response->as_error(); - $this->assertEquals($error_data->get_error_message(), 'You don\'t have permission to update this entry'); + $this->assertEquals($error_data->get_error_message(), 'Sorry, you are not allowed to do that.'); } /** @@ -339,7 +339,7 @@ class Wiass_REST_Delivery_Process_Api_Test extends Wiaas_Unit_Test_Case { $this->assertEquals($response->get_status(), 401); $error_data = $response->as_error(); - $this->assertEquals($error_data->get_error_message(), 'You don\'t have permission to read this entry'); + $this->assertEquals($error_data->get_error_message(), 'Sorry, you are not allowed to do that.'); } /** @@ -507,7 +507,7 @@ class Wiass_REST_Delivery_Process_Api_Test extends Wiaas_Unit_Test_Case { //this part is needed since form submit does not store files for some reason, probably files should be sent some other way $entry = GFAPI::get_entries($customer_acceptance_form_id)[0]; - $entry[$files_uploaded_field_id] = json_encode(['http://path/to/file1.docx']); + $entry[$files_uploaded_field_id] = json_encode(['http://localhost/wp/index.php?gf-download=2018%2F08%2Ffile1.docx&form-id=1&field-id=12&hash=1be6c30f0eeff93563b352d15fe459d5ded12ee06c2c8f36fed66b42dedf2534']); $entry['workflow_step'] = 1; $entry['workflow_step_status_1'] = 'pending'; $entry['workflow_step_status_2'] = false;