test element youtube url
This commit is contained in:
parent
8a06f5a57c
commit
f9c4d72e60
6 changed files with 75 additions and 0 deletions
|
|
@ -15,6 +15,8 @@ class ElementsEndpointTest extends TestCase
|
|||
|
||||
public function testReturnsElementTitle(): void
|
||||
{
|
||||
$sampleYoutubeUrl = 'https://www.youtube.com/watch?v='
|
||||
. 'yHx-r4p6hHU&t=1s';
|
||||
$setRepository = app(SetRepository::class);
|
||||
$elementRepository = app(ElementRepository::class);
|
||||
$set = $setRepository->create(new CreateSetDto(
|
||||
|
|
@ -28,6 +30,7 @@ class ElementsEndpointTest extends TestCase
|
|||
description: 'A structured path for growth',
|
||||
richText: '<p>A structured path for growth</p>',
|
||||
pdfPath: '/assets/pdfs/baderech.pdf',
|
||||
youtubeUrl: $sampleYoutubeUrl,
|
||||
parentElement: null,
|
||||
));
|
||||
$firstChildElement = $elementRepository->create(new CreateElementDto(
|
||||
|
|
@ -36,6 +39,7 @@ class ElementsEndpointTest extends TestCase
|
|||
description: 'Foundations for steady avodah',
|
||||
richText: '<p>Foundations rich text</p>',
|
||||
pdfPath: '/assets/pdfs/foundations.pdf',
|
||||
youtubeUrl: null,
|
||||
parentElement: $element,
|
||||
));
|
||||
$secondChildElement = $elementRepository->create(new CreateElementDto(
|
||||
|
|
@ -44,6 +48,7 @@ class ElementsEndpointTest extends TestCase
|
|||
description: 'Daily practices for growth',
|
||||
richText: '<p>Daily practice rich text</p>',
|
||||
pdfPath: null,
|
||||
youtubeUrl: null,
|
||||
parentElement: $element,
|
||||
));
|
||||
|
||||
|
|
@ -69,6 +74,7 @@ class ElementsEndpointTest extends TestCase
|
|||
'description' => 'A structured path for growth',
|
||||
'richText' => '<p>A structured path for growth</p>',
|
||||
'pdfPath' => '/assets/pdfs/baderech.pdf',
|
||||
'youtubeUrl' => $sampleYoutubeUrl,
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ class SetsEndpointTest extends TestCase
|
|||
description: $baderechSet->getDescription(),
|
||||
richText: '',
|
||||
pdfPath: null,
|
||||
youtubeUrl: null,
|
||||
parentElement: null,
|
||||
)
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue