Create a new form for the user

[MAILPOET-1798]
This commit is contained in:
Pavel Dohnal
2020-02-10 11:02:37 +01:00
committed by Jack Kitterhing
parent 3443f082ef
commit 0fd954184d
7 changed files with 82 additions and 40 deletions

View File

@ -71,7 +71,7 @@ class FormsTest extends \MailPoetTest {
'name' => 'My First Form',
];
$response = $this->endpoint->save($formData);
$response = $this->endpoint->save(Form::createOrUpdate($formData));
expect($response->status)->equals(APIResponse::STATUS_OK);
expect($response->data)->equals(
Form::where('name', 'My First Form')->findOne()->asArray()