Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lruozzi9 committed May 27, 2024
1 parent 50f20d9 commit 53c30fd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spec/ValueHandler/FileAttributeValueHandlerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ public function it_save_file_to_media_when_handling_product_variant(
$productMediaFileApi->download('path/to/a/file.jpg')->shouldHaveBeenCalled();
$filesystem->mkdir('public/media/attachment/product/path/to/a')->shouldHaveBeenCalled();
$filesystem->rename(Argument::type('string'), 'public/media/attachment/product/path/to/a/file.jpg', true)->shouldHaveBeenCalled();
$filesystem->chmod('public/media/attachment/product/path/to/a/file.jpg', 0755)->shouldHaveBeenCalled();
}

public function it_skips_files_related_to_channels_that_are_not_associated_to_the_product_and_it_downloads_the_first_file_with_null_scope(
Expand Down Expand Up @@ -202,7 +203,8 @@ public function it_skips_files_related_to_channels_that_are_not_associated_to_th

$productMediaFileApi->download('path/to/a/file.jpg')->shouldHaveBeenCalled();
$filesystem->mkdir('public/media/attachment/product/path/to/a')->shouldHaveBeenCalled();
$filesystem->rename(Argument::type('string'), 'public/media/attachment/product/path/to/a/file.jpg', true)->shouldHaveBeenCalled();
$filesystem->rename(Argument::type('string'), 'public/media/attachment/product/path/to/a/file.jpg', true)->shouldHaveBeenCalled(); $filesystem->chmod('public/media/attachment/product/path/to/a/file.jpg', 0755)->shouldHaveBeenCalled();
$filesystem->chmod('public/media/attachment/product/path/to/a/file.jpg', 0755)->shouldHaveBeenCalled();
}

public function it_skips_files_related_to_channels_that_are_not_associated_to_the_product_and_it_downloads_the_first_file_with_channel_scope(
Expand Down Expand Up @@ -242,6 +244,7 @@ public function it_skips_files_related_to_channels_that_are_not_associated_to_th
$productMediaFileApi->download('path/to/a/file.jpg')->shouldHaveBeenCalled();
$filesystem->mkdir('public/media/attachment/product/path/to/a')->shouldHaveBeenCalled();
$filesystem->rename(Argument::type('string'), 'public/media/attachment/product/path/to/a/file.jpg', true)->shouldHaveBeenCalled();
$filesystem->chmod('public/media/attachment/product/path/to/a/file.jpg', 0755)->shouldHaveBeenCalled();
}

public function it_throws_when_data_doesnt_contain_scope_info(ProductVariantInterface $productVariant): void
Expand Down

0 comments on commit 53c30fd

Please sign in to comment.