diff --git a/tests/Unit/Helpers/StorageHelperTest.php b/tests/Unit/Helpers/StorageHelperTest.php index a97ac445db6..1523b83cbc8 100644 --- a/tests/Unit/Helpers/StorageHelperTest.php +++ b/tests/Unit/Helpers/StorageHelperTest.php @@ -32,4 +32,24 @@ public function it_checks_if_we_can_upload_another_file_in_the_account(): void $this->assertFalse(StorageHelper::canUploadFile($account)); } + + /** @test */ + public function it_checks_if_we_can_upload_files_with_0_storage_limit(): void + { + $account = Account::factory()->create([ + 'storage_limit_in_mb' => 0, + ]); + + $this->assertTrue(StorageHelper::canUploadFile($account)); + + $vault = Vault::factory()->create([ + 'account_id' => $account->id, + ]); + File::factory()->create([ + 'vault_id' => $vault->id, + 'size' => 1024 * 1024, + ]); + + $this->assertTrue(StorageHelper::canUploadFile($account)); + } }