Files
opnform-host-nginx/api/tests/Feature/Forms/FormIntegrationEventTest.php
Chirag Chhatrala dad5c825b1 Apply Mentions everywhere (#595)
* variables and mentions

* fix lint

* add missing changes

* fix tests

* update quilly, fix bugs

* fix lint

* apply fixes

* apply fixes

* Fix MentionParser

* Apply Mentions everywhere

* Fix MentionParserTest

* Small refactoring

* Fixing quill import issues

* Polished email integration, added customer sender mail

* Add missing changes

* improve migration command

---------

Co-authored-by: Frank <csskfaves@gmail.com>
Co-authored-by: Julien Nahum <julien@nahum.net>
2024-10-22 10:34:29 +02:00

34 lines
1.1 KiB
PHP

<?php
it('can fetch form integration events', function () {
$user = $this->actingAsProUser();
$workspace = $this->createUserWorkspace($user);
$form = $this->createForm($user, $workspace);
$data = [
'status' => true,
'integration_id' => 'email',
'logic' => null,
'settings' => [
'send_to' => 'test@test.com',
'sender_name' => 'OpnForm',
'subject' => 'New form submission',
'email_content' => 'Hello there 👋 <br>New form submission received.',
'include_submission_data' => true,
'include_hidden_fields_submission_data' => false,
'reply_to' => null
]
];
$response = $this->postJson(route('open.forms.integration.create', $form->id), $data)
->assertSuccessful()
->assertJson([
'type' => 'success',
'message' => 'Form Integration was created.'
]);
$this->getJson(route('open.forms.integrations.events', [$form->id, $response->json('form_integration.id')]))
->assertSuccessful()
->assertJsonCount(0);
});