fix loading show form page (#361)

Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
Favour Olayinka
2024-03-25 16:05:24 +01:00
committed by GitHub
parent e517cba88a
commit 2191f46214
5 changed files with 48 additions and 1 deletions

View File

@@ -34,6 +34,19 @@ it('can fetch forms', function () {
->assertJsonPath('data.0.title', $form->title);
});
it('can fetch a form', function () {
$user = $this->actingAsProUser();
$workspace = $this->createUserWorkspace($user);
$form = $this->createForm($user, $workspace);
$response = $this->getJson(route('open.forms.show', $form->slug))
->assertSuccessful()
->assertJson([
'id' => $form->id,
'title' => $form->title
]);
});
it('can update a form', function () {
$user = $this->actingAsUser();
$workspace = $this->createUserWorkspace($user);