From a1d98155d6be720b50eb73723b12e6febee25f6d Mon Sep 17 00:00:00 2001 From: KD Date: Mon, 28 Mar 2022 08:29:06 +0200 Subject: [PATCH] fix test --- tests/Api/QuestionnaireCreateTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/Api/QuestionnaireCreateTest.php b/tests/Api/QuestionnaireCreateTest.php index d6939ef..e38e64e 100644 --- a/tests/Api/QuestionnaireCreateTest.php +++ b/tests/Api/QuestionnaireCreateTest.php @@ -73,7 +73,10 @@ public function testAdminCanCreateQuestionnaireWithModels(): void $newModel = $model::factory() ->count(1) ->create(); - $questionnaireModel2 = QuestionnaireModel::factory()->makeOne(['model_id' => $newModel[0]->id]); + $questionnaireModel2 = QuestionnaireModel::factory()->makeOne([ + 'model_id' => $newModel[0]->id, + 'model_type_id' => $questionnaireModelType->getKey(), + ]); $response = $this->actingAs($this->user, 'api')->postJson( '/api/admin/questionnaire',