summaryrefslogtreecommitdiff
path: root/tests/Feature/AssetsTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Feature/AssetsTest.php')
-rw-r--r--tests/Feature/AssetsTest.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/Feature/AssetsTest.php b/tests/Feature/AssetsTest.php
index f618d46..9614eee 100644
--- a/tests/Feature/AssetsTest.php
+++ b/tests/Feature/AssetsTest.php
@@ -94,5 +94,24 @@ describe('manages manifests', function() use ($newManifest) {
$result = $assets->getFileManifest($file);
expect($result)->toBe($manifest);
});
+});
+
+describe('queuing files', function() use ($newManifest) {
+ test('queue script', function() use ($newManifest) {
+ $assets = app(Assets::class);
+ $manifest = $newManifest();
+ $assets->addManifest('main', $manifest, true);
+ $assets->queueScript('main::main.js');
+
+ expect($assets->getQueuedFooterFiles())->toBeArray()->toHaveLength(1);
+ });
+
+ test('queue style', function() use ($newManifest) {
+ $assets = app(Assets::class);
+ $manifest = $newManifest();
+ $assets->addManifest('main', $manifest, true);
+ $assets->queueStyle('main::main.css');
+ expect($assets->getQueuedHeadFiles())->toBeArray()->toHaveLength(1);
+ });
});