Update usages of form factory

[MAILPOET-2985]
This commit is contained in:
Rostislav Wolny
2020-06-30 15:58:06 +02:00
committed by Veljko V
parent 7d62b15979
commit c4628d4f78
4 changed files with 9 additions and 32 deletions

View File

@ -72,18 +72,6 @@ class FormsTest extends \MailPoetTest {
expect($response->data['name'])->equals('');
}
public function testItCanSaveAForm() {
$formData = [
'name' => 'My First Form',
];
$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()
);
}
public function testItCanStoreDataForPreview() {
$response = $this->endpoint->create();
$formId = $response->data['id'];