Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lehecht committed Jan 19, 2024
1 parent 50334c8 commit 7746e0e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/php/Jobs/CloneImagesOrVideosTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public function testCloneImageVolume()
$volume = $this->volume([
'created_at' => '2022-11-09 14:37:00',
'updated_at' => '2022-11-09 14:37:00',
'attrs' => [
'creating_async' => true,
],
])->fresh(); // Use fresh() to load even the null fields.

$copy = $volume->replicate();
Expand Down Expand Up @@ -63,6 +66,7 @@ public function testCloneImageVolume()
$this->assertNotEquals($volume->created_at, $copy->created_at);
$this->assertNotEquals($volume->updated_at, $copy->updated_at);
$this->assertEmpty($copy->images()->first()->labels()->get());
$this->assertFalse($copy->creating_async);

$ignore = ['id', 'created_at', 'updated_at'];
$this->assertEquals(
Expand All @@ -78,6 +82,9 @@ public function testCloneVideoVolume()
'created_at' => '2022-01-09 14:37:00',
'updated_at' => '2022-01-09 14:37:00',
'media_type_id' => MediaType::videoId(),
'attrs' => [
'creating_async' => true,
],
])->fresh(); // Use fresh() to load even the null fields.
$copy = $volume->replicate();
$copy->save();
Expand All @@ -104,6 +111,7 @@ public function testCloneVideoVolume()
$copy = $project->volumes()->first();

$this->assertEmpty($copy->videos()->first()->labels()->get());
$this->assertFalse($copy->creating_async);
}

public function testCloneVolumeImages()
Expand Down

0 comments on commit 7746e0e

Please sign in to comment.