Files
laravel-manager/tests/Feature/StatisticsOffTest.php
T
Matthijs Iriks 5c0a94f167
PR CI / ledger (pull_request) Successful in 4s
PR CI / flow (pull_request) Successful in 4s
PR CI / ui (pull_request) Successful in 18s
PR CI / test (lowest) (pull_request) Successful in 39s
PR CI / security (pull_request) Successful in 49s
PR CI / test (stable) (pull_request) Successful in 51s
PR CI / pr-ci (pull_request) Successful in 2s
PR CI / release-automerge (pull_request) Successful in 3s
Add the pulse script and the component for the public pages
2026-12-04 05:35:30 +01:00

24 lines
870 B
PHP

<?php
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Schema;
use IriksIT\Manager\Facades\Manager;
use IriksIT\Manager\Tests\TestCase;
uses(TestCase::class);
it('has no statistics, pulse routes, tables or rights unless the site switched them on', function () {
expect(Route::has('manager.statistics.index'))->toBeFalse()
->and(Route::has('manager.pulse.view'))->toBeFalse()
->and(Schema::hasTable('manager_visits'))->toBeFalse()
->and(Schema::hasTable('manager_bot_hits'))->toBeFalse()
->and(Manager::permissionValues())->not->toContain('statistics.view');
$this->postJson('/pulse/view', ['path' => '/'])->assertNotFound();
});
it('puts nothing in a page for the pulse component', function () {
expect(trim(Blade::render('<x-manager::pulse />')))->toBe('');
});