Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmitchell committed Feb 27, 2025
1 parent ba8e6c8 commit 237b7c9
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/Assets/AssetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2639,4 +2639,22 @@ public function it_does_not_delete_when_a_deleting_event_returns_false()
Facades\Asset::shouldNotHaveReceived('delete');
Event::assertNotDispatched(AssetDeleted::class);
}

#[Test]
public function it_uses_a_custom_cache_store()
{
config([
'cache.stores.asset_meta' => [
'driver' => 'file',
'path' => storage_path('statamic/asset-meta'),
],
]);

Storage::fake('local');

$store = (new Asset)->cacheStore();

// ideally we would have checked the store name, but laravel 10 doesnt give us a way to do that
$this->assertStringContainsString('asset-meta', $store->getStore()->getDirectory());
}
}

0 comments on commit 237b7c9

Please sign in to comment.